Skip to content

Commit

Permalink
Remove unused name_str_pair method
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Jun 8, 2014
1 parent 862cd65 commit 9452cd2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
6 changes: 0 additions & 6 deletions src/librustdoc/clean/mod.rs
Expand Up @@ -429,17 +429,11 @@ impl attr::AttrMetaMethods for Attribute {
}
}
fn meta_item_list<'a>(&'a self) -> Option<&'a [@ast::MetaItem]> { None }
fn name_str_pair(&self) -> Option<(InternedString, InternedString)> {
None
}
}
impl<'a> attr::AttrMetaMethods for &'a Attribute {
fn name(&self) -> InternedString { (**self).name() }
fn value_str(&self) -> Option<InternedString> { (**self).value_str() }
fn meta_item_list<'a>(&'a self) -> Option<&'a [@ast::MetaItem]> { None }
fn name_str_pair(&self) -> Option<(InternedString, InternedString)> {
None
}
}

#[deriving(Clone, Encodable, Decodable)]
Expand Down
16 changes: 0 additions & 16 deletions src/libsyntax/attr.rs
Expand Up @@ -53,12 +53,6 @@ pub trait AttrMetaMethods {
fn value_str(&self) -> Option<InternedString>;
/// Gets a list of inner meta items from a list MetaItem type.
fn meta_item_list<'a>(&'a self) -> Option<&'a [@MetaItem]>;

/**
* If the meta item is a name-value type with a string value then returns
* a tuple containing the name and string value, otherwise `None`
*/
fn name_str_pair(&self) -> Option<(InternedString,InternedString)>;
}

impl AttrMetaMethods for Attribute {
Expand All @@ -76,9 +70,6 @@ impl AttrMetaMethods for Attribute {
fn meta_item_list<'a>(&'a self) -> Option<&'a [@MetaItem]> {
self.node.value.meta_item_list()
}
fn name_str_pair(&self) -> Option<(InternedString,InternedString)> {
self.meta().name_str_pair()
}
}

impl AttrMetaMethods for MetaItem {
Expand Down Expand Up @@ -108,10 +99,6 @@ impl AttrMetaMethods for MetaItem {
_ => None
}
}

fn name_str_pair(&self) -> Option<(InternedString,InternedString)> {
self.value_str().map(|s| (self.name(), s))
}
}

// Annoying, but required to get test_cfg to work
Expand All @@ -121,9 +108,6 @@ impl AttrMetaMethods for @MetaItem {
fn meta_item_list<'a>(&'a self) -> Option<&'a [@MetaItem]> {
(**self).meta_item_list()
}
fn name_str_pair(&self) -> Option<(InternedString,InternedString)> {
(**self).name_str_pair()
}
}


Expand Down

5 comments on commit 9452cd2

@bors
Copy link
Contributor

@bors bors commented on 9452cd2 Jun 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at sfackler@9452cd2

@bors
Copy link
Contributor

@bors bors commented on 9452cd2 Jun 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging sfackler/rust/visit-attr = 9452cd2 into auto

@bors
Copy link
Contributor

@bors bors commented on 9452cd2 Jun 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sfackler/rust/visit-attr = 9452cd2 merged ok, testing candidate = 9239bb4

@bors
Copy link
Contributor

@bors bors commented on 9452cd2 Jun 8, 2014

@bors
Copy link
Contributor

@bors bors commented on 9452cd2 Jun 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 9239bb4

Please sign in to comment.