rust/compiler
bors b9c5fdc888 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.
2023-05-28 01:18:51 +00:00
..
rustc
rustc_abi Avoid &format("...") calls in error message code. 2023-05-16 17:59:56 +10:00
rustc_apfloat
rustc_arena Deny the unsafe_op_in_unsafe_fn lint in 2023-04-28 21:00:54 -07:00
rustc_ast Add warn-by-default lint for local binding shadowing exported glob re-export item 2023-05-27 18:49:07 +08:00
rustc_ast_lowering Auto merge of #111858 - clubby789:fluent-alphabetical, r=jyn514,compiler-errors 2023-05-26 03:31:04 +00:00
rustc_ast_passes Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
rustc_ast_pretty Migrate offset_of from a macro to builtin # syntax 2023-05-05 21:44:13 +02:00
rustc_attr Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
rustc_baked_icu_data Regen baked data 2023-05-02 10:45:16 -07:00
rustc_borrowck Rollup merge of #111983 - compiler-errors:type-op-locally, r=lcnr 2023-05-27 13:38:32 +02:00
rustc_builtin_macros Auto merge of #111928 - c410-f3r:dqewdas, r=eholk 2023-05-27 07:02:48 +00:00
rustc_codegen_cranelift Rollup merge of #111952 - cjgillot:drop-replace, r=WaffleLapkin 2023-05-27 13:38:31 +02:00
rustc_codegen_gcc Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
rustc_codegen_llvm Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
rustc_codegen_ssa Rollup merge of #111952 - cjgillot:drop-replace, r=WaffleLapkin 2023-05-27 13:38:31 +02:00
rustc_const_eval Rollup merge of #111952 - cjgillot:drop-replace, r=WaffleLapkin 2023-05-27 13:38:31 +02:00
rustc_data_structures Rollup merge of #111875 - WaffleLapkin:defer_on_drop, r=Nilstrieb 2023-05-25 08:01:08 +02:00
rustc_driver
rustc_driver_impl Rollup merge of #109084 - dekrain:fix-panic-arg0-expansion, r=petrochenkov 2023-05-27 20:40:27 +02:00
rustc_error_codes Rollup merge of #111215 - BoxyUwU:resolve_anon_consts_differently, r=cjgillot 2023-05-09 20:49:32 +02:00
rustc_error_messages correct literals for dyn thread safe 2023-05-06 09:34:53 +08:00
rustc_errors Auto merge of #111858 - clubby789:fluent-alphabetical, r=jyn514,compiler-errors 2023-05-26 03:31:04 +00:00
rustc_expand Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
rustc_feature Use is_some_and/is_ok_and in less obvious spots 2023-05-24 14:33:43 +00:00
rustc_fluent_macro Remove unused synstructure dep 2023-04-22 22:03:33 +01:00
rustc_fs_util
rustc_graphviz enable rust_2018_idioms for doctests 2023-05-07 00:12:29 +03:00
rustc_hir Use Option::is_some_and and Result::is_ok_and in the compiler 2023-05-24 14:20:41 +00:00
rustc_hir_analysis print const and type errors in braces not square brackets 2023-05-26 16:01:29 +01:00
rustc_hir_pretty Rip it out 2023-05-01 16:15:13 +08:00
rustc_hir_typeck Auto merge of #111245 - fee1-dead-contrib:temp-fix-tuple-struct-field, r=lcnr 2023-05-27 01:27:01 +00:00
rustc_incremental Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
rustc_index Auto merge of #111925 - Manishearth:rollup-z6z6l2v, r=Manishearth 2023-05-25 00:33:43 +00:00
rustc_infer Auto merge of #111918 - compiler-errors:custom-type-ops-err, r=lcnr 2023-05-26 06:20:21 +00:00
rustc_interface Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
rustc_lexer Don't try to eat non-existent decimal digits. 2023-05-15 18:33:12 +10:00
rustc_lint Auto merge of #111378 - jieyouxu:local-shadows-glob-reexport, r=petrochenkov 2023-05-28 01:18:51 +00:00
rustc_lint_defs Add warn-by-default lint for local binding shadowing exported glob re-export item 2023-05-27 18:49:07 +08:00
rustc_llvm Auto merge of #111364 - cuviper:unhack-thinlto, r=nikic 2023-05-18 01:35:41 +00:00
rustc_log Stabilize IsTerminal 2023-04-10 17:24:23 +09:00
rustc_macros Merge query property modules into one 2023-05-18 09:45:12 +02:00
rustc_metadata Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
rustc_middle Auto merge of #111378 - jieyouxu:local-shadows-glob-reexport, r=petrochenkov 2023-05-28 01:18:51 +00:00
rustc_mir_build Rollup merge of #111952 - cjgillot:drop-replace, r=WaffleLapkin 2023-05-27 13:38:31 +02:00
rustc_mir_dataflow Rollup merge of #111952 - cjgillot:drop-replace, r=WaffleLapkin 2023-05-27 13:38:31 +02:00
rustc_mir_transform Rollup merge of #111952 - cjgillot:drop-replace, r=WaffleLapkin 2023-05-27 13:38:31 +02:00
rustc_monomorphize Rollup merge of #111899 - nnethercote:cgu-cleanups, r=wesleywiser 2023-05-26 08:24:07 +02:00
rustc_parse Rollup merge of #111181 - bvanjoi:fix-issue-111148, r=davidtwco 2023-05-27 20:40:28 +02:00
rustc_parse_format Fix typos in compiler 2023-04-10 22:02:52 +02:00
rustc_passes Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
rustc_plugin_impl Add rustc_fluent_macro to decouple fluent from rustc_macros 2023-04-18 18:56:22 +00:00
rustc_privacy Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
rustc_query_impl Add comment 2023-05-21 11:25:07 +02:00
rustc_query_system Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
rustc_resolve Add warn-by-default lint for local binding shadowing exported glob re-export item 2023-05-27 18:49:07 +08:00
rustc_serialize Fix the FileEncoder buffer size. 2023-05-15 08:59:11 +10:00
rustc_session Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
rustc_smir Remove DesugaringKind::Replace. 2023-05-25 17:40:46 +00:00
rustc_span Rollup merge of #111952 - cjgillot:drop-replace, r=WaffleLapkin 2023-05-27 13:38:31 +02:00
rustc_symbol_mangling Use Option::is_some_and and Result::is_ok_and in the compiler 2023-05-24 14:20:41 +00:00
rustc_target Rollup merge of #111384 - bmisiak:issue-106021-fix, r=petrochenkov 2023-05-26 08:24:07 +02:00
rustc_trait_selection Auto merge of #111378 - jieyouxu:local-shadows-glob-reexport, r=petrochenkov 2023-05-28 01:18:51 +00:00
rustc_traits Uplift complex type ops back into typeck so we can call them locally 2023-05-27 04:13:44 +00:00
rustc_transmute Remove unused TypeFoldable/TypeVisitable impls. 2023-04-26 15:19:50 +10:00
rustc_ty_utils Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00
rustc_type_ir Implement references VarDebugInfo. 2023-05-13 10:12:14 +00:00