summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-06 15:31:39 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-06 15:31:39 -0800
commit3892dd1eaa9e1c52aba0179b9d6e27a5ced0afc7 (patch)
tree3a7d88b619e91b9f9088eb364ae9a2c3d755175b /src/libsyntax
parente3f047c8c558624e276ca36c5854b9fdcd4e5965 (diff)
parentd31105e4f5e880e17f7607addae3573440a4c68a (diff)
downloadrust-3892dd1eaa9e1c52aba0179b9d6e27a5ced0afc7.tar.gz
rust-3892dd1eaa9e1c52aba0179b9d6e27a5ced0afc7.zip
rollup merge of #20593: nikomatsakis/unused-tps-in-impl
Conflicts:
	src/libcollections/lib.rs
	src/librustc/lib.rs
	src/libserialize/lib.rs
	src/libstd/lib.rs
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs4
-rw-r--r--src/libsyntax/feature_gate.rs10
2 files changed, 12 insertions, 2 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 45233dd5225..beb7246a734 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -979,8 +979,8 @@ pub enum Sign {
     Plus
 }
 
-impl<T> Sign where T: Int {
-    pub fn new(n: T) -> Sign {
+impl Sign {
+    pub fn new<T:Int>(n: T) -> Sign {
         if n < Int::zero() {
             Minus
         } else {
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 38a369bdb57..75d231d68b5 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -86,6 +86,9 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
     // A way to temporarily opt out of the new orphan rules. This will *never* be accepted.
     ("old_orphan_check", Deprecated),
 
+    // A way to temporarily opt out of the new impl rules. This will *never* be accepted.
+    ("old_impl_check", Deprecated),
+
     // OIBIT specific features
     ("optin_builtin_traits", Active),
 
@@ -294,6 +297,13 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
                         i.span,
                         "the new orphan check rules will eventually be strictly enforced");
                 }
+
+                if attr::contains_name(i.attrs[],
+                                       "old_impl_check") {
+                    self.gate_feature("old_impl_check",
+                                      i.span,
+                                      "`#[old_impl_check]` will be removed in the future");
+                }
             }
 
             _ => {}