1
Fork 0

Rustdoc - display since version for stable items

Fixes #27607
This commit is contained in:
Wesley Wiser 2016-02-09 21:15:29 -05:00
parent 32b2ef7add
commit 75acee2bde
3 changed files with 94 additions and 27 deletions

View file

@ -339,6 +339,14 @@ impl Item {
_ => String::new(),
}
}
pub fn stable_since(&self) -> Option<&str> {
if let Some(ref s) = self.stability {
return Some(&s.since[..]);
}
None
}
}
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]