rust/compiler/rustc_feature/src
Matthias Krüger 36c2b011cb
Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-dead
New const traits syntax

This PR only affects the AST and doesn't actually change anything semantically.

All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser

Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error

r? ``@fee1-dead``

cc ``@nikomatsakis`` ``@traviscross`` ``@compiler-errors``
2025-06-27 22:13:00 +02:00
..
accepted.rs stabilize gai 2025-06-11 15:30:15 +01:00
builtin_attrs.rs Rollup merge of #142671 - davidtwco:no-default-bounds-attr, r=lcnr 2025-06-27 15:04:52 +02:00
lib.rs Remove rustc_feature::Stability 2025-06-09 11:44:52 +02:00
removed.rs Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-dead 2025-06-27 22:13:00 +02:00
tests.rs rustc_feature: Avoid unsafe std::env::set_var() in UnstableFeatures tests 2025-01-08 11:37:19 +01:00
unstable.rs Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-dead 2025-06-27 22:13:00 +02:00