Skip to content

update tests to match lint message changes from rust-lang/rust#140794 #15849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

karolzwolak
Copy link
Contributor

Needed for rust-lang/rust#140794 (not merged yet).

@rustbot
Copy link
Collaborator

rustbot commented Aug 17, 2025

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added Command-fix S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 17, 2025
@karolzwolak karolzwolak force-pushed the update-lint-messages-rust-140794 branch 2 times, most recently from 84ae699 to ca2c81c Compare August 17, 2025 13:38
@karolzwolak
Copy link
Contributor Author

Update:

To be fair, the rustfix tests don't strcitly need the messages to be accurate to pass the tests, they tests the fix suggestions.
I thought the compiler output should be kept in sync in the tests, but I can revert it.

Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@weihanglo weihanglo enabled auto-merge August 17, 2025 16:29
@weihanglo weihanglo disabled auto-merge August 17, 2025 16:30
Comment on lines 1866 to 1872
| ^^^^^^^^^^^^^^^^^^^
|
= [NOTE] `#[warn(unused_imports)]` [..]on by default

[WARNING] `foo` (lib) generated 1 warning (run `cargo fix --lib -p foo` to apply 1 suggestion)
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you keep ... so we dont excessively assert too many stuff?

Suggested change
| ^^^^^^^^^^^^^^^^^^^
|
= [NOTE] `#[warn(unused_imports)]` [..]on by default
[WARNING] `foo` (lib) generated 1 warning (run `cargo fix --lib -p foo` to apply 1 suggestion)
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
...
= [NOTE] `#[warn(unused_imports)]` [..]on by default
...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, would you mind cleaning up commit like squashing some of them, so it is less confusing when tracing back git history?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Btw why not just squash such PR into 1 commit either using github squash & merge or via some bot?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are meanings in each commit. For example, we follow a variant of the atomic commit pattern especially for bugfix.

Take this https://github.com/rust-lang/cargo/pull/14432/commits as an example. The first commit added a test showing the current problematic behavior. It can be see as a minimal reproducible example to make sure you're fixing a really-existing bug. The next bugfix commit contains both the fix and the test change, so through the test diff you can clearly see the behavior changed.

I know it is a burden on contributors to clean up git history. I can actually do it by myself before merge if the PR allows maintainers to edit. However, sometimes PR author may feel offended like we took their contribution credits. Not sure what the right way is though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your help anyway!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I can see the appeal of atomic commits, but I'd argue that squashing PR into a single commits has its uses too. If we apply the 'atomic' principle to PRs themselves, the meaningful change is a single commit, and you don’t have to check which PR a commit belongs to.

I just thought it’d be cool to combine both approaches, if commits from a single PR were grouped (like squashed), but you could still see the original commits that make up the PR - not just their names, but the actual revisions and changes too.

I know it is a burden on contributors to clean up git history. I can actually do it by myself before merge if the PR allows maintainers to edit. However, sometimes PR author may feel offended like we took their contribution credits. Not sure what the right way is though.

I think leaving the authors to do the rebasing themselves is the way to go, since you won't really learn unless you do it yourself. Also github keeps the overwritten commits for some time, so it's not like someone can completely overwrite and lose their work.

Thanks too for the quick reviews.

@rustbot rustbot added S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 17, 2025
@karolzwolak karolzwolak force-pushed the update-lint-messages-rust-140794 branch from c81b5ee to cec8eb1 Compare August 17, 2025 16:51
@weihanglo weihanglo enabled auto-merge August 17, 2025 17:17
@weihanglo weihanglo added this pull request to the merge queue Aug 17, 2025
Merged via the queue into rust-lang:master with commit 71eb84f Aug 17, 2025
25 checks passed
bors added a commit to rust-lang/rust that referenced this pull request Aug 17, 2025
Update cargo

28 commits in 840b83a10fb0e039a83f4d70ad032892c287570a..71eb84f21aef43c07580c6aed6f806a6299f5042
2025-07-30 13:59:19 +0000 to 2025-08-17 17:18:56 +0000
- update tests to match lint message changes from #140794 (rust-lang/cargo#15849)
- chore: downgrade to libc@0.2.174 (rust-lang/cargo#15851)
- Reorder `lto` options in profiles.md (rust-lang/cargo#15841)
- feat(unstable): add -Zbuild-analysis unstable feature (rust-lang/cargo#15845)
- refactor(unstable): group stabilized features (rust-lang/cargo#15846)
- Fixes error while running the cargo clippy --all-targets -- -D warning (rust-lang/cargo#15843)
- Clarify that `cargo doc --no-deps` is cumulative and won’t delete prev (rust-lang/cargo#15800)
- docs: Formatting and cross-linking to build-dir/target-dir docs (rust-lang/cargo#15840)
- Stabilize `build.build-dir` (rust-lang/cargo#15833)
- make resolve features public for cargo-as-a-library (rust-lang/cargo#15835)
- chore(deps): bump slab from 0.4.10 to 0.4.11 (rust-lang/cargo#15832)
- chore: remove x86_64-apple-darwin from CI and tests (rust-lang/cargo#15831)
- chore(deps): update msrv (3 versions) to v1.87 (rust-lang/cargo#15819)
- perf(package): Always reuse the workspace's target-dir (rust-lang/cargo#15783)
- More helpful error for invalid cargo-features = [] (rust-lang/cargo#15781)
- Add initial integration for `--json=timings` behing `-Zsection-timings` (rust-lang/cargo#15780)
- add is_inherited methods to InheritableDependency and InheritableField (rust-lang/cargo#15828)
- chore(deps): update compatible (rust-lang/cargo#15804)
- docs(unstable): Link out to the Plumbing commands effort (rust-lang/cargo#15821)
- chore(deps): update cargo-semver-checks to v0.43.0 (rust-lang/cargo#15825)
- test(build-std): relax the thread name assertion (rust-lang/cargo#15822)
- chore(deps): update msrv (1 version) to v1.89 (rust-lang/cargo#15815)
- Update semver tests for 1.89 (rust-lang/cargo#15816)
- Accessing each build script's `OUT_DIR` and in the correct order (rust-lang/cargo#15776)
- chore: bump to 0.92.0; update changelog (rust-lang/cargo#15807)
- docs: `-Zpackage-workspace` has been stabilized (rust-lang/cargo#15808)
- chore(deps): update rust crate cargo_metadata to 0.21.0 (rust-lang/cargo#15795)
- docs(build-rs): Fix broken intra-doc links (rust-lang/cargo#15810)
bors added a commit to rust-lang/rust that referenced this pull request Aug 18, 2025
Update cargo

28 commits in 840b83a10fb0e039a83f4d70ad032892c287570a..71eb84f21aef43c07580c6aed6f806a6299f5042
2025-07-30 13:59:19 +0000 to 2025-08-17 17:18:56 +0000
- update tests to match lint message changes from #140794 (rust-lang/cargo#15849)
- chore: downgrade to libc@0.2.174 (rust-lang/cargo#15851)
- Reorder `lto` options in profiles.md (rust-lang/cargo#15841)
- feat(unstable): add -Zbuild-analysis unstable feature (rust-lang/cargo#15845)
- refactor(unstable): group stabilized features (rust-lang/cargo#15846)
- Fixes error while running the cargo clippy --all-targets -- -D warning (rust-lang/cargo#15843)
- Clarify that `cargo doc --no-deps` is cumulative and won’t delete prev (rust-lang/cargo#15800)
- docs: Formatting and cross-linking to build-dir/target-dir docs (rust-lang/cargo#15840)
- Stabilize `build.build-dir` (rust-lang/cargo#15833)
- make resolve features public for cargo-as-a-library (rust-lang/cargo#15835)
- chore(deps): bump slab from 0.4.10 to 0.4.11 (rust-lang/cargo#15832)
- chore: remove x86_64-apple-darwin from CI and tests (rust-lang/cargo#15831)
- chore(deps): update msrv (3 versions) to v1.87 (rust-lang/cargo#15819)
- perf(package): Always reuse the workspace's target-dir (rust-lang/cargo#15783)
- More helpful error for invalid cargo-features = [] (rust-lang/cargo#15781)
- Add initial integration for `--json=timings` behing `-Zsection-timings` (rust-lang/cargo#15780)
- add is_inherited methods to InheritableDependency and InheritableField (rust-lang/cargo#15828)
- chore(deps): update compatible (rust-lang/cargo#15804)
- docs(unstable): Link out to the Plumbing commands effort (rust-lang/cargo#15821)
- chore(deps): update cargo-semver-checks to v0.43.0 (rust-lang/cargo#15825)
- test(build-std): relax the thread name assertion (rust-lang/cargo#15822)
- chore(deps): update msrv (1 version) to v1.89 (rust-lang/cargo#15815)
- Update semver tests for 1.89 (rust-lang/cargo#15816)
- Accessing each build script's `OUT_DIR` and in the correct order (rust-lang/cargo#15776)
- chore: bump to 0.92.0; update changelog (rust-lang/cargo#15807)
- docs: `-Zpackage-workspace` has been stabilized (rust-lang/cargo#15808)
- chore(deps): update rust crate cargo_metadata to 0.21.0 (rust-lang/cargo#15795)
- docs(build-rs): Fix broken intra-doc links (rust-lang/cargo#15810)
bors added a commit to rust-lang/rust that referenced this pull request Aug 18, 2025
Update cargo

28 commits in 840b83a10fb0e039a83f4d70ad032892c287570a..71eb84f21aef43c07580c6aed6f806a6299f5042
2025-07-30 13:59:19 +0000 to 2025-08-17 17:18:56 +0000
- update tests to match lint message changes from #140794 (rust-lang/cargo#15849)
- chore: downgrade to libc@0.2.174 (rust-lang/cargo#15851)
- Reorder `lto` options in profiles.md (rust-lang/cargo#15841)
- feat(unstable): add -Zbuild-analysis unstable feature (rust-lang/cargo#15845)
- refactor(unstable): group stabilized features (rust-lang/cargo#15846)
- Fixes error while running the cargo clippy --all-targets -- -D warning (rust-lang/cargo#15843)
- Clarify that `cargo doc --no-deps` is cumulative and won’t delete prev (rust-lang/cargo#15800)
- docs: Formatting and cross-linking to build-dir/target-dir docs (rust-lang/cargo#15840)
- Stabilize `build.build-dir` (rust-lang/cargo#15833)
- make resolve features public for cargo-as-a-library (rust-lang/cargo#15835)
- chore(deps): bump slab from 0.4.10 to 0.4.11 (rust-lang/cargo#15832)
- chore: remove x86_64-apple-darwin from CI and tests (rust-lang/cargo#15831)
- chore(deps): update msrv (3 versions) to v1.87 (rust-lang/cargo#15819)
- perf(package): Always reuse the workspace's target-dir (rust-lang/cargo#15783)
- More helpful error for invalid cargo-features = [] (rust-lang/cargo#15781)
- Add initial integration for `--json=timings` behing `-Zsection-timings` (rust-lang/cargo#15780)
- add is_inherited methods to InheritableDependency and InheritableField (rust-lang/cargo#15828)
- chore(deps): update compatible (rust-lang/cargo#15804)
- docs(unstable): Link out to the Plumbing commands effort (rust-lang/cargo#15821)
- chore(deps): update cargo-semver-checks to v0.43.0 (rust-lang/cargo#15825)
- test(build-std): relax the thread name assertion (rust-lang/cargo#15822)
- chore(deps): update msrv (1 version) to v1.89 (rust-lang/cargo#15815)
- Update semver tests for 1.89 (rust-lang/cargo#15816)
- Accessing each build script's `OUT_DIR` and in the correct order (rust-lang/cargo#15776)
- chore: bump to 0.92.0; update changelog (rust-lang/cargo#15807)
- docs: `-Zpackage-workspace` has been stabilized (rust-lang/cargo#15808)
- chore(deps): update rust crate cargo_metadata to 0.21.0 (rust-lang/cargo#15795)
- docs(build-rs): Fix broken intra-doc links (rust-lang/cargo#15810)
@rustbot rustbot added this to the 1.91.0 milestone Aug 18, 2025
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 20, 2025
Update cargo

28 commits in 840b83a10fb0e039a83f4d70ad032892c287570a..71eb84f21aef43c07580c6aed6f806a6299f5042
2025-07-30 13:59:19 +0000 to 2025-08-17 17:18:56 +0000
- update tests to match lint message changes from rust-lang/rust#140794 (rust-lang/cargo#15849)
- chore: downgrade to libc@0.2.174 (rust-lang/cargo#15851)
- Reorder `lto` options in profiles.md (rust-lang/cargo#15841)
- feat(unstable): add -Zbuild-analysis unstable feature (rust-lang/cargo#15845)
- refactor(unstable): group stabilized features (rust-lang/cargo#15846)
- Fixes error while running the cargo clippy --all-targets -- -D warning (rust-lang/cargo#15843)
- Clarify that `cargo doc --no-deps` is cumulative and won’t delete prev (rust-lang/cargo#15800)
- docs: Formatting and cross-linking to build-dir/target-dir docs (rust-lang/cargo#15840)
- Stabilize `build.build-dir` (rust-lang/cargo#15833)
- make resolve features public for cargo-as-a-library (rust-lang/cargo#15835)
- chore(deps): bump slab from 0.4.10 to 0.4.11 (rust-lang/cargo#15832)
- chore: remove x86_64-apple-darwin from CI and tests (rust-lang/cargo#15831)
- chore(deps): update msrv (3 versions) to v1.87 (rust-lang/cargo#15819)
- perf(package): Always reuse the workspace's target-dir (rust-lang/cargo#15783)
- More helpful error for invalid cargo-features = [] (rust-lang/cargo#15781)
- Add initial integration for `--json=timings` behing `-Zsection-timings` (rust-lang/cargo#15780)
- add is_inherited methods to InheritableDependency and InheritableField (rust-lang/cargo#15828)
- chore(deps): update compatible (rust-lang/cargo#15804)
- docs(unstable): Link out to the Plumbing commands effort (rust-lang/cargo#15821)
- chore(deps): update cargo-semver-checks to v0.43.0 (rust-lang/cargo#15825)
- test(build-std): relax the thread name assertion (rust-lang/cargo#15822)
- chore(deps): update msrv (1 version) to v1.89 (rust-lang/cargo#15815)
- Update semver tests for 1.89 (rust-lang/cargo#15816)
- Accessing each build script's `OUT_DIR` and in the correct order (rust-lang/cargo#15776)
- chore: bump to 0.92.0; update changelog (rust-lang/cargo#15807)
- docs: `-Zpackage-workspace` has been stabilized (rust-lang/cargo#15808)
- chore(deps): update rust crate cargo_metadata to 0.21.0 (rust-lang/cargo#15795)
- docs(build-rs): Fix broken intra-doc links (rust-lang/cargo#15810)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-fix S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants