]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #39265 - est31:master, r=petrochenkov
authorbors <bors@rust-lang.org>
Thu, 9 Feb 2017 11:42:49 +0000 (11:42 +0000)
committerbors <bors@rust-lang.org>
Thu, 9 Feb 2017 11:42:49 +0000 (11:42 +0000)
Stabilize static lifetime in statics

Stabilize the "static_in_const" feature. Blockers before this PR can be merged:

* [x] The [FCP with inclination to stabilize](https://github.com/rust-lang/rust/issues/35897#issuecomment-270441437) needs to be over. FCP lasts roughly three weeks, so will be over at Jan 25, aka this thursday.
* [x] Documentation needs to be added (#37928)

Closes #35897.

1  2 
src/libsyntax/feature_gate.rs

index cc0a67b3d2e94b64c46ac60f29deffc5a9deebb0,77846b69829c8606d5e6d7b4e3f0cb2aa9a650a7..a7c86bf8e06bae014aa2b2c8ed08c2ffe10e6e79
@@@ -281,9 -281,6 +281,6 @@@ declare_features! 
      // Allows untagged unions `union U { ... }`
      (active, untagged_unions, "1.13.0", Some(32836)),
  
-     // elide `'static` lifetimes in `static`s and `const`s
-     (active, static_in_const, "1.13.0", Some(35897)),
      // Used to identify the `compiler_builtins` crate
      // rustc internal
      (active, compiler_builtins, "1.13.0", None),
  
      // `extern "msp430-interrupt" fn()`
      (active, abi_msp430_interrupt, "1.16.0", Some(38487)),
 +
 +    // Used to identify crates that contain sanitizer runtimes
 +    // rustc internal
 +    (active, sanitizer_runtime, "1.17.0", None),
  );
  
  declare_features! (
@@@ -386,6 -379,8 +383,8 @@@ declare_features! 
      (accepted, item_like_imports, "1.14.0", Some(35120)),
      // Allows using `Self` and associated types in struct expressions and patterns.
      (accepted, more_struct_aliases, "1.16.0", Some(37544)),
+     // elide `'static` lifetimes in `static`s and `const`s
+     (accepted, static_in_const, "1.17.0", Some(35897)),
  );
  // (changing above list without updating src/doc/reference.md makes @cmr sad)
  
@@@ -651,12 -646,6 +650,12 @@@ pub const BUILTIN_ATTRIBUTES: &'static 
                                                contains compiler-rt intrinsics and will never be \
                                                stable",
                                            cfg_fn!(compiler_builtins))),
 +    ("sanitizer_runtime", Whitelisted, Gated(Stability::Unstable,
 +                                             "sanitizer_runtime",
 +                                             "the `#[sanitizer_runtime]` attribute is used to \
 +                                              identify crates that contain the runtime of a \
 +                                              sanitizer and will never be stable",
 +                                             cfg_fn!(sanitizer_runtime))),
  
      ("allow_internal_unstable", Normal, Gated(Stability::Unstable,
                                                "allow_internal_unstable",