rust/compiler
bors 5ea62560f2 Auto merge of #118668 - fmease:resolve-assoc-item-bindings-by-namespace, r=compiler-errors
Resolve associated item bindings by namespace

This is the 3rd commit split off from #118360 with tests reblessed (they no longer contain duplicated diags which were caused by 4c0addc80af4666f26d7ad51fe34a0e2dd0b8b74) & slightly adapted (removed supertraits from a UI test, cc #118040).

> * Resolve all assoc item bindings (type, const, fn (feature `return_type_notation`)) by namespace instead of trying to resolve a type first (in the non-RTN case) and falling back to consts afterwards. This is consistent with RTN. E.g., for `Tr<K = {…}>` we now always try to look up assoc consts (this extends to supertrait bounds). This gets rid of assoc tys shadowing assoc consts in assoc item bindings which is undesirable & inconsistent (types and consts live in different namespaces after all)
> * Consolidate the resolution of assoc {ty, const} bindings and RTN (dedup, better diags for RTN)
> * Fix assoc consts being labeled as assoc *types* in several diagnostics
> * Make a bunch of diagnostics translatable

Fixes #112560 (error → pass).

As discussed
r? `@compiler-errors`

---

**Addendum**: What I call “associated item bindings” are commonly referred to as “type bindings” for historical reasons. Nowadays, “type bindings” include assoc type bindings, assoc const bindings and RTN (return type notation) which is why I prefer not to use this outdated term.
2023-12-08 09:30:52 +00:00
..
rustc Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_abi Rename LayoutCalculator::delay_bug as LayoutCalculator::delayed_bug. 2023-12-02 09:01:34 +11:00
rustc_arena rustc_arena: add alloc_str 2023-12-05 17:52:51 -08:00
rustc_ast Address code review feedback 2023-12-04 14:33:46 -08:00
rustc_ast_lowering Auto merge of #118605 - fee1-dead-contrib:rm-rustc_host, r=compiler-errors 2023-12-06 16:00:24 +00:00
rustc_ast_passes Address code review feedback 2023-12-04 14:33:46 -08:00
rustc_ast_pretty Option<CoroutineKind> 2023-12-04 13:03:37 -08:00
rustc_attr Use Session::diagnostic in more places. 2023-12-02 09:01:35 +11:00
rustc_baked_icu_data Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_borrowck Provide more suggestions for cloning immutable bindings 2023-12-04 21:54:34 +00:00
rustc_builtin_macros Auto merge of #118655 - compiler-errors:rollup-vrngyzn, r=compiler-errors 2023-12-06 04:20:51 +00:00
rustc_codegen_cranelift Auto merge of #118324 - RalfJung:ctfe-read-only-pointers, r=saethlin 2023-12-07 18:11:01 +00:00
rustc_codegen_gcc Auto merge of #118324 - RalfJung:ctfe-read-only-pointers, r=saethlin 2023-12-07 18:11:01 +00:00
rustc_codegen_llvm Auto merge of #118568 - DianQK:no-builtins-symbols, r=pnkfelix 2023-12-07 20:31:55 +00:00
rustc_codegen_ssa Auto merge of #118568 - DianQK:no-builtins-symbols, r=pnkfelix 2023-12-07 20:31:55 +00:00
rustc_const_eval Auto merge of #118324 - RalfJung:ctfe-read-only-pointers, r=saethlin 2023-12-07 18:11:01 +00:00
rustc_data_structures 1. fix jobserver GLOBAL_CLIENT_CHECKED uninitialized before use 2023-12-08 09:50:28 +08:00
rustc_driver Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_driver_impl rustc_driver_impl: Address all rustc::potential_query_instability lints 2023-12-05 06:19:14 +01:00
rustc_error_codes Yeet E0744 2023-11-28 20:40:38 +00:00
rustc_error_messages Remove rustc_error_messages/messages.ftl. 2023-11-26 08:37:27 +11:00
rustc_errors Inline and remove fatal_no_raise. 2023-12-04 18:57:42 +11:00
rustc_expand Auto merge of #118655 - compiler-errors:rollup-vrngyzn, r=compiler-errors 2023-12-06 04:20:51 +00:00
rustc_feature Auto merge of #118605 - fee1-dead-contrib:rm-rustc_host, r=compiler-errors 2023-12-06 16:00:24 +00:00
rustc_fluent_macro Add a useful comment. 2023-11-26 08:38:02 +11:00
rustc_fs_util Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_graphviz remove unused pub fn 2023-11-23 14:11:02 +03:00
rustc_hir Auto merge of #118605 - fee1-dead-contrib:rm-rustc_host, r=compiler-errors 2023-12-06 16:00:24 +00:00
rustc_hir_analysis Auto merge of #118668 - fmease:resolve-assoc-item-bindings-by-namespace, r=compiler-errors 2023-12-08 09:30:52 +00:00
rustc_hir_pretty Remove #[rustc_host], use internal desugaring 2023-12-05 01:15:21 +00:00
rustc_hir_typeck add unused NormalizesTo predicate 2023-12-07 17:52:51 +01:00
rustc_incremental Rename HandlerInner::delayed_span_bugs as HandlerInner::span_delayed_bugs. 2023-12-02 09:01:34 +11:00
rustc_index Replace no_ord_impl with orderable. 2023-11-22 18:38:17 +11:00
rustc_index_macros Put backticks around some attributes in doc comments. 2023-11-27 09:37:01 +11:00
rustc_infer update fixme 2023-12-08 02:16:29 +01:00
rustc_interface 1. fix jobserver GLOBAL_CLIENT_CHECKED uninitialized before use 2023-12-08 09:50:28 +08:00
rustc_lexer Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_lint Rollup merge of #118504 - compiler-errors:must-use, r=WaffleLapkin 2023-12-06 21:52:32 +01:00
rustc_lint_defs Auto merge of #118324 - RalfJung:ctfe-read-only-pointers, r=saethlin 2023-12-07 18:11:01 +00:00
rustc_llvm Rollup merge of #118177 - sivadeilra:suppress-llvm-warnings, r=cuviper 2023-12-06 21:52:31 +01:00
rustc_log rustc_log: provide a way to init logging based on the values, not names, of the env vars 2023-11-11 15:24:33 +01:00
rustc_macros Unify HashStable implementations 2023-11-21 05:49:45 +00:00
rustc_metadata Auto merge of #118488 - andjo403:remove_deadlock, r=SparrowLii 2023-12-05 14:02:15 +00:00
rustc_middle Auto merge of #118725 - lcnr:normalizes-to-projection-split-3, r=BoxyUwU 2023-12-08 02:28:10 +00:00
rustc_mir_build Rollup merge of #118598 - Nadrieril:remove_precise_pointer_size_matching, r=davidtwco 2023-12-05 16:08:35 +01:00
rustc_mir_dataflow Deparameterize Results and ResultsCursor. 2023-11-27 10:35:43 +11:00
rustc_mir_transform Rollup merge of #118695 - Zalathar:push-refined, r=davidtwco 2023-12-08 06:44:43 +01:00
rustc_monomorphize Rollup merge of #118693 - saethlin:alignment-check-symbol-reachable, r=bjorn3 2023-12-08 06:44:42 +01:00
rustc_parse Rollup merge of #116420 - bvanjoi:fix-116203, r=Nilstrieb 2023-12-07 21:38:07 +01:00
rustc_parse_format Auto merge of #117819 - fmease:rustc_parse_format-stable-rustc, r=Nilstrieb 2023-11-15 14:55:35 +00:00
rustc_passes Remove #[rustc_host], use internal desugaring 2023-12-05 01:15:21 +00:00
rustc_privacy privacy: Simplify update_macro_reachable 2023-12-06 16:44:14 +03:00
rustc_query_impl QueryContext: rename try_collect_active_jobs -> collect_active_jobs and change it's return type from Option<QueryMap> to QueryMap 2023-11-27 18:13:15 +03:00
rustc_query_system Rollup merge of #118123 - RalfJung:internal-lib-features, r=compiler-errors 2023-12-05 14:52:41 -05:00
rustc_resolve Auto merge of #118687 - matthiaskrgr:rollup-317ztgu, r=matthiaskrgr 2023-12-06 22:23:25 +00:00
rustc_serialize Call FileEncoder::finish in rmeta encoding 2023-11-22 22:49:22 -05:00
rustc_session Rollup merge of #118709 - oksbsb:fix-job-server, r=SparrowLii 2023-12-08 06:44:43 +01:00
rustc_smir Auto merge of #118725 - lcnr:normalizes-to-projection-split-3, r=BoxyUwU 2023-12-08 02:28:10 +00:00
rustc_span Rollup merge of #118660 - cuviper:alloc_str, r=petrochenkov 2023-12-06 21:52:32 +01:00
rustc_symbol_mangling CFI: Add char to CFI integer normalization 2023-12-07 11:28:16 -08:00
rustc_target targets: remove not-added {i386,i486}-unknown-linux-gnu 2023-12-07 15:36:00 +00:00
rustc_trait_selection Auto merge of #118725 - lcnr:normalizes-to-projection-split-3, r=BoxyUwU 2023-12-08 02:28:10 +00:00
rustc_traits add unused NormalizesTo predicate 2023-12-07 17:52:51 +01:00
rustc_transmute Update itertools to 0.11. 2023-11-22 08:13:21 +11:00
rustc_ty_utils Yeet PolyGenSig 2023-12-06 19:50:35 +00:00
rustc_type_ir implement and use NormalizesTo 2023-12-08 01:31:18 +01:00
stable_mir Rollup merge of #118688 - celinval:smir-rvalue-ty, r=compiler-errors 2023-12-07 21:38:08 +01:00