diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-01-10 14:02:36 -0800 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2014-02-02 01:44:48 +1100 |
| commit | 8e52b85d5a6f6e3aaa2f15d7c1e907d0ce8589ee (patch) | |
| tree | afcac214c65f792304926a71117ffdf37a0fd060 /src/libsyntax/print/pprust.rs | |
| parent | 70c5a0fbf784d6a89b1c2c50f9fe83093bd21abc (diff) | |
| download | rust-8e52b85d5a6f6e3aaa2f15d7c1e907d0ce8589ee.tar.gz rust-8e52b85d5a6f6e3aaa2f15d7c1e907d0ce8589ee.zip | |
libsyntax: De-`@str` literal strings in the AST
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 89d8173f7e7..32b0766249e 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -897,7 +897,7 @@ pub fn print_attribute(s: &mut State, attr: &ast::Attribute) { maybe_print_comment(s, attr.span.lo); if attr.node.is_sugared_doc { let comment = attr.value_str().unwrap(); - word(&mut s.s, comment); + word(&mut s.s, comment.get()); } else { word(&mut s.s, "#["); print_meta_item(s, attr.meta()); @@ -1931,10 +1931,10 @@ pub fn print_meta_item(s: &mut State, item: &ast::MetaItem) { ibox(s, indent_unit); match item.node { ast::MetaWord(ref name) => word(&mut s.s, name.get()), - ast::MetaNameValue(ref name, value) => { + ast::MetaNameValue(ref name, ref value) => { word_space(s, name.get()); word_space(s, "="); - print_literal(s, &value); + print_literal(s, value); } ast::MetaList(ref name, ref items) => { word(&mut s.s, name.get()); @@ -2172,7 +2172,7 @@ pub fn print_literal(s: &mut State, lit: &ast::Lit) { _ => () } match lit.node { - ast::LitStr(st, style) => print_string(s, st, style), + ast::LitStr(ref st, style) => print_string(s, st.get(), style), ast::LitChar(ch) => { let mut res = ~"'"; char::from_u32(ch).unwrap().escape_default(|c| res.push_char(c)); |
