about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-05-24 19:43:03 +0000
committerJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-06-14 07:39:32 +0000
commit01a0877a738224e97d03f76d86f54d9cfe9b3cf7 (patch)
treef6698da355c47e6437b01fbefeac6a2f0eb9054b
parentbf84f4e171fa0169af59881bc5d87ecc84d61523 (diff)
downloadrust-01a0877a738224e97d03f76d86f54d9cfe9b3cf7.tar.gz
rust-01a0877a738224e97d03f76d86f54d9cfe9b3cf7.zip
Remove inherent method `attrs()` on AST nodes. `attrs()` is now a method of trait `HasAttrs`.
-rw-r--r--src/libsyntax/ast.rs30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 40c98206c16..ef140a7614a 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -15,7 +15,7 @@ pub use self::UnsafeSource::*;
 pub use self::ViewPath_::*;
 pub use self::PathParameters::*;
 
-use attr::{ThinAttributes, HasAttrs};
+use attr::ThinAttributes;
 use codemap::{mk_sp, respan, Span, Spanned, DUMMY_SP, ExpnId};
 use abi::Abi;
 use errors;
@@ -825,10 +825,6 @@ impl StmtKind {
             StmtKind::Mac(..) => None,
         }
     }
-
-    pub fn attrs(&self) -> &[Attribute] {
-        HasAttrs::attrs(self)
-    }
 }
 
 #[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
@@ -858,12 +854,6 @@ pub struct Local {
     pub attrs: ThinAttributes,
 }
 
-impl Local {
-    pub fn attrs(&self) -> &[Attribute] {
-        HasAttrs::attrs(self)
-    }
-}
-
 pub type Decl = Spanned<DeclKind>;
 
 #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
@@ -874,12 +864,6 @@ pub enum DeclKind {
     Item(P<Item>),
 }
 
-impl Decl {
-    pub fn attrs(&self) -> &[Attribute] {
-        HasAttrs::attrs(self)
-    }
-}
-
 /// represents one arm of a 'match'
 #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
 pub struct Arm {
@@ -919,12 +903,6 @@ pub struct Expr {
     pub attrs: ThinAttributes
 }
 
-impl Expr {
-    pub fn attrs(&self) -> &[Attribute] {
-        HasAttrs::attrs(self)
-    }
-}
-
 impl fmt::Debug for Expr {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         write!(f, "expr({}: {})", self.id, pprust::expr_to_string(self))
@@ -2036,12 +2014,6 @@ pub struct Item {
     pub span: Span,
 }
 
-impl Item {
-    pub fn attrs(&self) -> &[Attribute] {
-        &self.attrs
-    }
-}
-
 #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
 pub enum ItemKind {
     /// An`extern crate` item, with optional original crate name,