Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #146164
The hidden_glob_reexports lint will now skip generating a warning when the imported type points to the same type as public glob reexport
Let's create the following files to check the current behaviour
Current behaviour
Can test using
~/rust/build/host/stage1/bin/rustc --edition 2021 fix/before/allow_when_same.rs~/rust/build/host/stage1/bin/rustc --edition 2021 fix/before/warn_when_same.rsFix
compiler/rustc_resolve/src/imports.rs./x build --stage 1 # Compiler + standard library + sysroot (complete setup)Create these files
~/rust/build/host/stage1/bin/rustc --edition 2021 fix/after/not_warn_when_same.rs~/rust/build/host/stage1/bin/rustc --edition 2021 fix/after/should_warn_when_private_shadows_glob.rsFor development/quick testing,
hidden-glob-reexports-issue-146164.rs is the official test that goes into Rust, as every bug fix needs a test as per Rust standards. It's part of Rust's test suite that runs automatically
For official/CI testing