From f9a1087f2730ab021d5356a5df703baeccffc020 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 11 Feb 2015 13:57:40 +0100 Subject: Feature-gate the `#[unsafe_no_drop_flag]` attribute. See RFC 320, "Non-zeroing dynamic drops." Fix #22173 [breaking-change] --- src/libsyntax/feature_gate.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/libsyntax/feature_gate.rs') diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 72bbe1adfaa..e3b9402ba30 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -126,6 +126,10 @@ static KNOWN_FEATURES: &'static [(&'static str, &'static str, Status)] = &[ // Allows using #![no_std] ("no_std", "1.0.0", Active), + + // Allows using the unsafe_no_drop_flag attribute (unlikely to + // switch to Accepted; see RFC 320) + ("unsafe_no_drop_flag", "1.0.0", Active), ]; enum Status { @@ -474,6 +478,12 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> { self.gate_feature("no_std", attr.span, "no_std is experimental"); } + + if attr.check_name("unsafe_no_drop_flag") { + self.gate_feature("unsafe_no_drop_flag", attr.span, + "unsafe_no_drop_flag has unstable semantics \ + and may be removed in the future"); + } } fn visit_pat(&mut self, pattern: &ast::Pat) { -- cgit 1.4.1-3-g733a5