diff options
| -rw-r--r-- | src/libsyntax/ast.rs | 30 |
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, |
