diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-06-27 22:13:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-27 22:13:00 +0200 |
| commit | 36c2b011cb4bb9bd34647486551e85a969773c8d (patch) | |
| tree | e3b6cf9615355244e05cb699f6d3896217179a0c /compiler/rustc_feature | |
| parent | fe5f3dedf7b4d6bea2cadb17343f747d70b4c66b (diff) | |
| parent | 512ff9520666a952850d0a360a4310c5995f6991 (diff) | |
| download | rust-36c2b011cb4bb9bd34647486551e85a969773c8d.tar.gz rust-36c2b011cb4bb9bd34647486551e85a969773c8d.zip | |
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``
Diffstat (limited to 'compiler/rustc_feature')
| -rw-r--r-- | compiler/rustc_feature/src/removed.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_feature/src/unstable.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index ddb99585bc2..a855e4c1b0e 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -87,7 +87,7 @@ declare_features! ( Some("at compile-time, pointers do not have an integer value, so these casts cannot be properly supported"), 87020), /// Allows `T: ?const Trait` syntax in bounds. (removed, const_trait_bound_opt_out, "1.56.0", Some(67794), - Some("Removed in favor of `~const` bound in #![feature(const_trait_impl)]"), 88328), + Some("Removed in favor of `[const]` bound in #![feature(const_trait_impl)]"), 88328), /// Allows using `crate` as visibility modifier, synonymous with `pub(crate)`. (removed, crate_visibility_modifier, "1.63.0", Some(53120), Some("removed in favor of `pub(crate)`"), 97254), /// Allows using custom attributes (RFC 572). @@ -123,7 +123,7 @@ declare_features! ( /// [^1]: Formerly known as "object safe". (removed, dyn_compatible_for_dispatch, "1.87.0", Some(43561), Some("removed, not used heavily and represented additional complexity in dyn compatibility"), 136522), - /// Uses generic effect parameters for ~const bounds + /// Uses generic effect parameters for [const] bounds (removed, effects, "1.84.0", Some(102090), Some("removed, redundant with `#![feature(const_trait_impl)]`"), 132479), /// Allows defining `existential type`s. diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index e73a4e1766c..719ba597da1 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -437,7 +437,7 @@ declare_features! ( (unstable, const_async_blocks, "1.53.0", Some(85368)), /// Allows `const || {}` closures in const contexts. (incomplete, const_closures, "1.68.0", Some(106003)), - /// Allows using `~const Destruct` bounds and calling drop impls in const contexts. + /// Allows using `[const] Destruct` bounds and calling drop impls in const contexts. (unstable, const_destruct, "1.85.0", Some(133214)), /// Allows `for _ in _` loops in const contexts. (unstable, const_for, "1.56.0", Some(87575)), |
