rust/compiler/rustc_ast/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
..
attr Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
expand Generate better function argument names in global_allocator expansion 2023-08-06 07:36:05 -07:00
util Rollup merge of #118880 - GearsDatapacks:issue-118859-fix, r=compiler-errors 2023-12-17 21:29:59 +01:00
ast.rs Auto merge of #119163 - fmease:refactor-ast-trait-bound-modifiers, r=compiler-errors 2023-12-22 02:00:55 +00:00
ast_traits.rs Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
entry.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
format.rs get auto traits for parallel rustc 2023-08-02 16:21:45 +08:00
lib.rs Add HashStable_NoContext to simplify HashStable implementations in rustc_type_ir 2023-11-21 05:49:44 +00:00
mut_visit.rs Give VariantData::Struct named fields, to clairfy recovered. 2023-12-20 00:07:34 +00:00
node_id.rs Replace no_ord_impl with orderable. 2023-11-22 18:38:17 +11:00
ptr.rs make rustc compilable 2023-04-16 07:25:13 +00:00
token.rs remove redundant imports 2023-12-10 10:56:22 +08:00
tokenstream.rs Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
visit.rs remove redundant imports 2023-12-10 10:56:22 +08:00