-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
update tests to match lint message changes from rust-lang/rust#140794 #15849
Conversation
r? @weihanglo rustbot has assigned @weihanglo. Use |
84ae699
to
ca2c81c
Compare
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
tests/testsuite/fix.rs
Outdated
| ^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= [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 | ||
|
There was a problem hiding this comment.
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?
| ^^^^^^^^^^^^^^^^^^^ | |
| | |
= [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 | |
... |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
c81b5ee
to
cec8eb1
Compare
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)
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)
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)
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)
Needed for rust-lang/rust#140794 (not merged yet).