diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-02-11 13:57:40 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-02-11 13:57:40 +0100 |
| commit | f9a1087f2730ab021d5356a5df703baeccffc020 (patch) | |
| tree | f72d08a0947b2144e09b34066afa46d2ec3d032c /src/libsyntax/feature_gate.rs | |
| parent | 0047f8bbd8f94c7ba54d42eb7272c89a48d6ae54 (diff) | |
| download | rust-f9a1087f2730ab021d5356a5df703baeccffc020.tar.gz rust-f9a1087f2730ab021d5356a5df703baeccffc020.zip | |
Feature-gate the `#[unsafe_no_drop_flag]` attribute.
See RFC 320, "Non-zeroing dynamic drops." Fix #22173 [breaking-change]
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 10 |
1 files changed, 10 insertions, 0 deletions
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) { |
