token_to_ident takes argument by reference

This commit is contained in:
John Clements 2013-06-03 23:00:49 -07:00
parent 3203595471
commit 04a691a511
21 changed files with 48 additions and 46 deletions

View file

@ -3980,7 +3980,7 @@ impl Parser {
match *self.token {
token::LIT_STR(s) => {
self.bump();
let the_string = ident_to_str(s);
let the_string = ident_to_str(&s);
let mut words = ~[];
for str::each_word(*the_string) |s| { words.push(s) }
let mut abis = AbiSet::empty();
@ -4542,7 +4542,7 @@ impl Parser {
match *self.token {
token::LIT_STR(s) => {
self.bump();
ident_to_str(s)
ident_to_str(&s)
}
_ => self.fatal("expected string literal")
}