about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-28 01:18:51 +0000
committerbors <bors@rust-lang.org>2023-05-28 01:18:51 +0000
commitb9c5fdc888e05be88269a47d40fd0d911ec2be0b (patch)
tree1d646a6d1d479c4da669a6aabb8107d38ebe5f4e /compiler/rustc_mir_transform/src
parent9291627b76265112dccbebff55e103d211dbe9e5 (diff)
parentb9606589c4ca72008dc8d769f1a1c2b3578be65f (diff)
downloadrust-b9c5fdc888e05be88269a47d40fd0d911ec2be0b.tar.gz
rust-b9c5fdc888e05be88269a47d40fd0d911ec2be0b.zip
Auto merge of #111378 - jieyouxu:local-shadows-glob-reexport, r=petrochenkov
Add warn-by-default lint when local binding shadows exported glob re-export item

This PR introduces a warn-by-default rustc lint for when a local binding (a use statement, or a type declaration) produces a name which shadows an exported glob re-export item, causing the name from the exported glob re-export to be hidden (see #111336).

### Unresolved Questions

- [x] ~~Is this approach correct? While it passes the UI tests, I'm not entirely convinced it is correct.~~ Seems to be ok now.
- [x] ~~What should the lint be called / how should it be worded? I don't like calling `use x::*;` or `struct Foo;` a "local binding" but they are `NameBinding`s internally if I'm not mistaken.~~ ~~The lint is called `local_binding_shadows_glob_reexport` for now, unless a better name is suggested.~~ `hidden_glob_reexports`.

Fixes #111336.
Diffstat (limited to 'compiler/rustc_mir_transform/src')
0 files changed, 0 insertions, 0 deletions