diff options
| author | Aman Arora <me@aman-arora.com> | 2020-10-11 00:14:11 -0400 |
|---|---|---|
| committer | Aman Arora <me@aman-arora.com> | 2020-11-10 20:58:28 -0500 |
| commit | 88310cc0ebf4144205743dbb3a65223deffcf8e6 (patch) | |
| tree | 44ea1014b63661687515c17cc8b74572aad787ca /compiler/rustc_feature | |
| parent | 127a6ede1dd9622db20bee435221205b3a61d0ba (diff) | |
| download | rust-88310cc0ebf4144205743dbb3a65223deffcf8e6.tar.gz rust-88310cc0ebf4144205743dbb3a65223deffcf8e6.zip | |
Indroduce feature flag for RFC-2229
Signed-off-by: Aman Arora <me@aman-arora.com>
Diffstat (limited to 'compiler/rustc_feature')
| -rw-r--r-- | compiler/rustc_feature/src/active.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_feature/src/builtin_attrs.rs | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 0df67b63eba..a0355079247 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -616,6 +616,9 @@ declare_features! ( /// Enables `#[cfg(panic = "...")]` config key. (active, cfg_panic, "1.49.0", Some(77443), None), + /// Allows capturing disjoint fields in a closure/generator (RFC 2229). + (active, capture_disjoint_fields, "1.49.0", Some(53488), None), + // ------------------------------------------------------------------------- // feature-group-end: actual feature gates // ------------------------------------------------------------------------- @@ -639,6 +642,7 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[ sym::inline_const, sym::repr128, sym::unsized_locals, + sym::capture_disjoint_fields, ]; /// Some features are not allowed to be used together at the same time, if diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 5c5cf609ac3..fa8edba629e 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -547,6 +547,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ // ========================================================================== rustc_attr!(TEST, rustc_outlives, Normal, template!(Word)), + rustc_attr!(TEST, rustc_capture_analysis, Normal, template!(Word)), rustc_attr!(TEST, rustc_variance, Normal, template!(Word)), rustc_attr!(TEST, rustc_layout, Normal, template!(List: "field1, field2, ...")), rustc_attr!(TEST, rustc_regions, Normal, template!(Word)), |
