From ad7e33efee023822bd63fa6f942c25582ef12a1e Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sun, 11 Jan 2015 20:53:24 +0530 Subject: Feature gate #[rustc_on_unimplemented] --- src/libsyntax/feature_gate.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libsyntax') diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 8175c0a9eec..8929bbe0232 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -71,6 +71,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[ ("visible_private_types", Active), ("slicing_syntax", Active), ("box_syntax", Active), + ("on_unimplemented", Active), ("if_let", Accepted), ("while_let", Accepted), @@ -249,6 +250,10 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> { self.gate_feature("linkage", i.span, "the `linkage` attribute is experimental \ and not portable across platforms") + } else if attr.name() == "rustc_on_unimplemented" { + self.gate_feature("on_unimplemented", i.span, + "the `#[rustc_on_unimplemented]` attribute \ + is an experimental feature") } } match i.node { -- cgit 1.4.1-3-g733a5