resolve: Extend ambiguous_import_visibilities deprecation lint to glob-vs-glob ambiguities#154149
resolve: Extend ambiguous_import_visibilities deprecation lint to glob-vs-glob ambiguities#154149petrochenkov wants to merge 1 commit intorust-lang:mainfrom
ambiguous_import_visibilities deprecation lint to glob-vs-glob ambiguities#154149Conversation
| tcx, | ||
| ); | ||
| if let Some(max_vis_decl) = decl.ambiguity_vis_max.get() { | ||
| // Avoid the most visible import in an ambiguous glob set being reported as unused. |
|
|
||
| if let Some(binding) = resolution.binding() | ||
| && old_decl != Some(binding) | ||
| && (old_decl != Some(binding) || old_vis != Some(binding.vis())) |
There was a problem hiding this comment.
And this is a fix for #152347.
Here we are triggering the glob re-fetching on visibility updates.
171ed29 to
8c30e81
Compare
This comment has been minimized.
This comment has been minimized.
|
@bors try |
This comment has been minimized.
This comment has been minimized.
resolve: Extend `ambiguous_import_visibilities` deprecation lint to glob-vs-glob ambiguities
This comment has been minimized.
This comment has been minimized.
|
@craterbot check |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🎉 Experiment
Footnotes
|
8c30e81 to
9ea5bf0
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
9ea5bf0 to
5d4ff02
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5d4ff02 to
3b24e32
Compare
e960e19 to
12cbb36
Compare
This comment has been minimized.
This comment has been minimized.
12cbb36 to
4dcf942
Compare
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
|
Reassigning given https://rust-lang.zulipchat.com/#narrow/channel/356853-t-docs-rs/topic/metrics.20intitiative/near/585435779. r? @mu001999 |
|
r=me after rebase |
…lob-vs-glob ambiguities
4dcf942 to
d28ea81
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors r=mu001999 |
resolve: Extend `ambiguous_import_visibilities` deprecation lint to glob-vs-glob ambiguities Continuation of rust-lang#149596, implementation of this comment rust-lang#149596 (comment) in particular. FCP for the lint in general - rust-lang#149596 (comment). rust-lang#152498 is reverted as a part of the change, but fixes are applied to keep the tests added in that PR working. To implement this we have to have to track the most and the least visible declarations in an ambiguous glob set. Part of rust-lang#153961. r? @yaahc maybe
resolve: Extend `ambiguous_import_visibilities` deprecation lint to glob-vs-glob ambiguities Continuation of rust-lang#149596, implementation of this comment rust-lang#149596 (comment) in particular. FCP for the lint in general - rust-lang#149596 (comment). rust-lang#152498 is reverted as a part of the change, but fixes are applied to keep the tests added in that PR working. To implement this we have to have to track the most and the least visible declarations in an ambiguous glob set. Part of rust-lang#153961. r? @yaahc maybe
…uwer Rollup of 22 pull requests Successful merges: - #154149 (resolve: Extend `ambiguous_import_visibilities` deprecation lint to glob-vs-glob ambiguities) - #155189 (simd_reduce_min/max: remove float support) - #155453 (apply Cortex-A53 errata 843419 mitigation to the AArch64 Linux targets) - #155562 (Add a missing `GenericTypeVisitable`, and avoid having interner traits for `FnSigKind` and `Abi`) - #155608 (rustc_middle: Implement the `partial_cmp` operation for `DefId`s) - #155721 (When archive format is wrong produce an error instead of ICE) - #155794 (privacy: share effective visibility initialization) - #155832 (c-variadic: more precise compatibility check in const-eval) - #155856 (std_detect: support detecting more features on aarch64 Windows) - #155861 (Suggest `[const] Trait` bounds in more places) - #155899 (`dlltool`: Set the working directory to workaround `--temp-prefix` bug) - #155916 (Update with new LLVM 22 target for `wasm32-wali-linux-musl` target) - #155935 (remap OUT_DIR paths to fix build script path leakage in crate metadata. ) - #155950 (use the new `//@ needs-asm-mnemonic: ret` more) - #155958 (ci(free-disk-space): remove more tools and fix warnings) - #155966 (miri subtree update) - #155711 (bump curl-sys and openssl-sys to support OpenSSL 4.0.x) - #155831 (Add `AcceptContext::expect_key_value`) - #155877 (Avoid misleading return-type note for foreign `Fn` callees) - #155949 (Update `opt_ast_lowering_delayed_lints` query to allow "stealing" lints, allowing to use `FnOnce` instead of `Fn`) - #155951 (Make `FlatMapInPlaceVec` an unsafe trait.) - #155967 (Fix `doc_cfg` feature for extern items)
resolve: Extend `ambiguous_import_visibilities` deprecation lint to glob-vs-glob ambiguities Continuation of rust-lang#149596, implementation of this comment rust-lang#149596 (comment) in particular. FCP for the lint in general - rust-lang#149596 (comment). rust-lang#152498 is reverted as a part of the change, but fixes are applied to keep the tests added in that PR working. To implement this we have to have to track the most and the least visible declarations in an ambiguous glob set. Part of rust-lang#153961. r? @yaahc maybe
…uwer Rollup of 21 pull requests Successful merges: - #155966 (miri subtree update) - #154149 (resolve: Extend `ambiguous_import_visibilities` deprecation lint to glob-vs-glob ambiguities) - #155189 (simd_reduce_min/max: remove float support) - #155562 (Add a missing `GenericTypeVisitable`, and avoid having interner traits for `FnSigKind` and `Abi`) - #155608 (rustc_middle: Implement the `partial_cmp` operation for `DefId`s) - #155721 (When archive format is wrong produce an error instead of ICE) - #155794 (privacy: share effective visibility initialization) - #155832 (c-variadic: more precise compatibility check in const-eval) - #155856 (std_detect: support detecting more features on aarch64 Windows) - #155861 (Suggest `[const] Trait` bounds in more places) - #155899 (`dlltool`: Set the working directory to workaround `--temp-prefix` bug) - #155916 (Update with new LLVM 22 target for `wasm32-wali-linux-musl` target) - #155935 (remap OUT_DIR paths to fix build script path leakage in crate metadata. ) - #155950 (use the new `//@ needs-asm-mnemonic: ret` more) - #155958 (ci(free-disk-space): remove more tools and fix warnings) - #155711 (bump curl-sys and openssl-sys to support OpenSSL 4.0.x) - #155831 (Add `AcceptContext::expect_key_value`) - #155877 (Avoid misleading return-type note for foreign `Fn` callees) - #155949 (Update `opt_ast_lowering_delayed_lints` query to allow "stealing" lints, allowing to use `FnOnce` instead of `Fn`) - #155951 (Make `FlatMapInPlaceVec` an unsafe trait.) - #155967 (Fix `doc_cfg` feature for extern items)
View all comments
Continuation of #149596, implementation of this comment #149596 (comment) in particular.
FCP for the lint in general - #149596 (comment).
#152498 is reverted as a part of the change, but fixes are applied to keep the tests added in that PR working.
To implement this we have to have to track the most and the least visible declarations in an ambiguous glob set.
Part of #153961.
r? @yaahc maybe