Skip to content

Commit 9452cd2

Browse files
committed
Remove unused name_str_pair method
1 parent 862cd65 commit 9452cd2

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -429,17 +429,11 @@ impl attr::AttrMetaMethods for Attribute {
429429
}
430430
}
431431
fn meta_item_list<'a>(&'a self) -> Option<&'a [@ast::MetaItem]> { None }
432-
fn name_str_pair(&self) -> Option<(InternedString, InternedString)> {
433-
None
434-
}
435432
}
436433
impl<'a> attr::AttrMetaMethods for &'a Attribute {
437434
fn name(&self) -> InternedString { (**self).name() }
438435
fn value_str(&self) -> Option<InternedString> { (**self).value_str() }
439436
fn meta_item_list<'a>(&'a self) -> Option<&'a [@ast::MetaItem]> { None }
440-
fn name_str_pair(&self) -> Option<(InternedString, InternedString)> {
441-
None
442-
}
443437
}
444438

445439
#[deriving(Clone, Encodable, Decodable)]

src/libsyntax/attr.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@ pub trait AttrMetaMethods {
5353
fn value_str(&self) -> Option<InternedString>;
5454
/// Gets a list of inner meta items from a list MetaItem type.
5555
fn meta_item_list<'a>(&'a self) -> Option<&'a [@MetaItem]>;
56-
57-
/**
58-
* If the meta item is a name-value type with a string value then returns
59-
* a tuple containing the name and string value, otherwise `None`
60-
*/
61-
fn name_str_pair(&self) -> Option<(InternedString,InternedString)>;
6256
}
6357

6458
impl AttrMetaMethods for Attribute {
@@ -76,9 +70,6 @@ impl AttrMetaMethods for Attribute {
7670
fn meta_item_list<'a>(&'a self) -> Option<&'a [@MetaItem]> {
7771
self.node.value.meta_item_list()
7872
}
79-
fn name_str_pair(&self) -> Option<(InternedString,InternedString)> {
80-
self.meta().name_str_pair()
81-
}
8273
}
8374

8475
impl AttrMetaMethods for MetaItem {
@@ -108,10 +99,6 @@ impl AttrMetaMethods for MetaItem {
10899
_ => None
109100
}
110101
}
111-
112-
fn name_str_pair(&self) -> Option<(InternedString,InternedString)> {
113-
self.value_str().map(|s| (self.name(), s))
114-
}
115102
}
116103

117104
// Annoying, but required to get test_cfg to work
@@ -121,9 +108,6 @@ impl AttrMetaMethods for @MetaItem {
121108
fn meta_item_list<'a>(&'a self) -> Option<&'a [@MetaItem]> {
122109
(**self).meta_item_list()
123110
}
124-
fn name_str_pair(&self) -> Option<(InternedString,InternedString)> {
125-
(**self).name_str_pair()
126-
}
127111
}
128112

129113

0 commit comments

Comments
 (0)