Rollup merge of #37117 - pnkfelix:may-dangle-attr, r=nikomatsakis

`#[may_dangle]` attribute

`#[may_dangle]` attribute

Second step of #34761. Last big hurdle before we can work in earnest towards Allocator integration (#32838)

Note: I am not clear if this is *also* a syntax-breaking change that needs to be part of a breaking-batch.
This commit is contained in:
Eduard-Mihai Burtescu
2016-10-19 07:59:59 +03:00
committed by GitHub
27 changed files with 1098 additions and 36 deletions

View File

@@ -167,6 +167,9 @@ declare_features! (
// RFC 1238
(active, dropck_parametricity, "1.3.0", Some(28498)),
// Allows using the may_dangle attribute; RFC 1327
(active, dropck_eyepatch, "1.10.0", Some(34761)),
// Allows the use of custom attributes; RFC 572
(active, custom_attribute, "1.0.0", Some(29642)),
@@ -616,6 +619,11 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeGat
"unsafe_destructor_blind_to_params has unstable semantics \
and may be removed in the future",
cfg_fn!(dropck_parametricity))),
("may_dangle",
Normal,
Gated("dropck_eyepatch",
"may_dangle has unstable semantics and may be removed in the future",
cfg_fn!(dropck_eyepatch))),
("unwind", Whitelisted, Gated("unwind_attributes", "#[unwind] is experimental",
cfg_fn!(unwind_attributes))),