1
Fork 0

remove get_ident and get_name, make as_str sound

This commit is contained in:
Oliver Schneider 2015-07-28 18:07:20 +02:00
parent 9ca511cf63
commit 00a5e66f81
68 changed files with 433 additions and 534 deletions

View file

@ -75,7 +75,7 @@ fn doit(sess: &parse::ParseSess, mut lexer: lexer::StringReader,
continue
},
token::Shebang(s) => {
try!(write!(out, "{}", Escape(s.as_str())));
try!(write!(out, "{}", Escape(&s.as_str())));
continue
},
// If this '&' token is directly adjacent to another token, assume
@ -141,7 +141,7 @@ fn doit(sess: &parse::ParseSess, mut lexer: lexer::StringReader,
// keywords are also included in the identifier set
token::Ident(ident, _is_mod_sep) => {
match &token::get_ident(ident)[..] {
match &*ident.name.as_str() {
"ref" | "mut" => "kw-2",
"self" => "self",