Skip to content

Commit 52eeed2

Browse files
pcwaltonhuonw
authored andcommitted
libsyntax: De-@str MacroDef
1 parent c5cbfe8 commit 52eeed2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libsyntax/ext/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use std::unstable::dynamic_lib::DynamicLibrary;
3131
// ast::MacInvocTT.
3232

3333
pub struct MacroDef {
34-
name: @str,
34+
name: ~str,
3535
ext: SyntaxExtension
3636
}
3737

src/libsyntax/ext/tt/macro_rules.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use ext::tt::macro_parser::{parse, parse_or_else};
2121
use parse::lexer::{new_tt_reader, Reader};
2222
use parse::parser::Parser;
2323
use parse::attr::ParserAttr;
24-
use parse::token::{get_ident_interner, special_idents, gensym_ident, ident_to_str};
24+
use parse::token::{get_ident_interner, special_idents, gensym_ident};
2525
use parse::token::{FAT_ARROW, SEMI, NtMatchers, NtTT, EOF};
2626
use parse::token;
2727
use print;
@@ -231,7 +231,7 @@ pub fn add_new_extension(cx: &mut ExtCtxt,
231231
};
232232

233233
return MRDef(MacroDef {
234-
name: ident_to_str(&name),
234+
name: token::get_ident(name.name).get().to_str(),
235235
ext: NormalTT(exp, Some(sp))
236236
});
237237
}

0 commit comments

Comments
 (0)