diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-02-18 14:16:57 +0100 |
|---|---|---|
| committer | Folkert de Vries <folkert@folkertdev.nl> | 2025-06-23 20:43:04 +0200 |
| commit | ba5556d239c11232dc8d95123ea70a2783019476 (patch) | |
| tree | 0fc9a5eb5964d18de0ab43107b5964818f8bb49f /compiler/rustc_feature/src | |
| parent | 42245d34d22ade32b3f276dcf74deb826841594c (diff) | |
| download | rust-ba5556d239c11232dc8d95123ea70a2783019476.tar.gz rust-ba5556d239c11232dc8d95123ea70a2783019476.zip | |
Add `#[loop_match]` for improved DFA codegen
Co-authored-by: Folkert de Vries <folkert@folkertdev.nl>
Diffstat (limited to 'compiler/rustc_feature/src')
| -rw-r--r-- | compiler/rustc_feature/src/builtin_attrs.rs | 13 | ||||
| -rw-r--r-- | compiler/rustc_feature/src/unstable.rs | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 280b33f0723..85f3f51cfdf 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -657,6 +657,19 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ EncodeCrossCrate::Yes, min_generic_const_args, experimental!(type_const), ), + // The `#[loop_match]` and `#[const_continue]` attributes are part of the + // lang experiment for RFC 3720 tracked in: + // + // - https://github.com/rust-lang/rust/issues/132306 + gated!( + const_continue, Normal, template!(Word), ErrorFollowing, + EncodeCrossCrate::No, loop_match, experimental!(const_continue) + ), + gated!( + loop_match, Normal, template!(Word), ErrorFollowing, + EncodeCrossCrate::No, loop_match, experimental!(loop_match) + ), + // ========================================================================== // Internal attributes: Stability, deprecation, and unsafe: // ========================================================================== diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index 91715851226..d9d5334615a 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -557,6 +557,8 @@ declare_features! ( /// Allows using `#[link(kind = "link-arg", name = "...")]` /// to pass custom arguments to the linker. (unstable, link_arg_attribute, "1.76.0", Some(99427)), + /// Allows fused `loop`/`match` for direct intraprocedural jumps. + (incomplete, loop_match, "CURRENT_RUSTC_VERSION", Some(132306)), /// Give access to additional metadata about declarative macro meta-variables. (unstable, macro_metavar_expr, "1.61.0", Some(83527)), /// Provides a way to concatenate identifiers using metavariable expressions. |
