libsyntax: add some explicit copies

This commit is contained in:
Erick Tryzelaar 2013-02-24 18:32:02 -08:00
parent 752befe2a6
commit bff22cf166
8 changed files with 94 additions and 68 deletions

View file

@ -424,7 +424,7 @@ pub fn parse_nt(p: Parser, name: ~str) -> nonterminal {
~"ident" => match *p.token {
token::IDENT(sn,b) => { p.bump(); token::nt_ident(sn,b) }
_ => p.fatal(~"expected ident, found "
+ token::to_str(p.reader.interner(), *p.token))
+ token::to_str(p.reader.interner(), copy *p.token))
},
~"path" => token::nt_path(p.parse_path_with_tps(false)),
~"tt" => {