libsyntax: De-@str
literal strings in the AST
This commit is contained in:
parent
70c5a0fbf7
commit
8e52b85d5a
45 changed files with 432 additions and 275 deletions
|
@ -45,6 +45,7 @@ use extra::arc::Arc;
|
|||
use extra::json::ToJson;
|
||||
use syntax::ast;
|
||||
use syntax::attr;
|
||||
use syntax::parse::token::InternedString;
|
||||
|
||||
use clean;
|
||||
use doctree;
|
||||
|
@ -803,12 +804,13 @@ impl<'a> Item<'a> {
|
|||
impl<'a> fmt::Default for Item<'a> {
|
||||
fn fmt(it: &Item<'a>, fmt: &mut fmt::Formatter) {
|
||||
match attr::find_stability(it.item.attrs.iter()) {
|
||||
Some(stability) => {
|
||||
Some(ref stability) => {
|
||||
write!(fmt.buf,
|
||||
"<a class='stability {lvl}' title='{reason}'>{lvl}</a>",
|
||||
lvl = stability.level.to_str(),
|
||||
reason = match stability.text {
|
||||
Some(s) => s, None => @"",
|
||||
Some(ref s) => (*s).clone(),
|
||||
None => InternedString::new(""),
|
||||
});
|
||||
}
|
||||
None => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue