rust/compiler/rustc_resolve/src
bors aaef5fe497 Auto merge of #119163 - fmease:refactor-ast-trait-bound-modifiers, r=compiler-errors
Refactor AST trait bound modifiers

Instead of having two types to represent trait bound modifiers in the parser / the AST (`parser::ty::BoundModifiers` & `ast::TraitBoundModifier`), only to map one to the other later, just use `parser::ty::BoundModifiers` (moved & renamed to `ast::TraitBoundModifiers`).

The struct type is more extensible and easier to deal with (see [here](https://github.com/rust-lang/rust/pull/119099/files#r1430749981) and [here](https://github.com/rust-lang/rust/pull/119099/files#r1430752116) for context) since it more closely models what it represents: A compound of two kinds of modifiers, constness and polarity. Modeling this as an enum (the now removed `ast::TraitBoundModifier`) meant one had to add a new variant per *combination* of modifier kind, which simply isn't scalable and which lead to a lot of explicit non-DRY matches.

NB: `hir::TraitBoundModifier` being an enum is fine since HIR doesn't need to worry representing invalid modifier kind combinations as those get rejected during AST validation thereby immensely cutting down the number of possibilities.
2023-12-22 02:00:55 +00:00
..
diagnostics Implement the unused_macro_rules lint 2022-05-05 19:13:00 +02:00
late Refactor AST trait bound modifiers 2023-12-20 19:39:46 +01:00
build_reduced_graph.rs resolve: Stop feeding visibilities for import list stems 2023-12-20 20:27:10 +03:00
check_unused.rs Rollup merge of #116905 - Fenex:refactor/compiler/resolve, r=petrochenkov 2023-10-26 17:45:43 +02:00
def_collector.rs Introduce closure_id method on CoroutineKind 2023-12-08 21:46:39 +00:00
diagnostics.rs tip for define macro name after macro_rules! 2023-12-06 23:19:39 +08:00
effective_visibilities.rs resolve: Replace visibility table in resolver outputs with query feeding 2023-12-18 02:26:55 +03:00
errors.rs tip for define macro name after macro_rules! 2023-12-06 23:19:39 +08:00
ident.rs Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug. 2023-12-02 09:01:19 +11:00
imports.rs more clippy::complexity fixes 2023-12-12 20:41:51 +01:00
late.rs resolve: Feed visibilities for unresolved trait impl items 2023-12-19 22:33:26 +03:00
lib.rs resolve: Eagerly feed closure visibilities 2023-12-20 13:42:58 +03:00
macros.rs Rename Session::span_diagnostic as Session::dcx. 2023-12-18 16:06:21 +11:00
rustdoc.rs NFC don't convert types to identical types 2023-12-15 23:56:24 +01:00