diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-06-10 00:49:59 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-06-13 11:30:45 -0700 |
| commit | ce750a7dbcd2dc68db6de89956b1de3ecf9f2d0a (patch) | |
| tree | 55c2ee5be0986c2489879022d4788d6c3ac2c964 /src/libsyntax/parse/common.rs | |
| parent | bdd20000665a35e14b4ec2c54f893fc80fe451ef (diff) | |
| download | rust-ce750a7dbcd2dc68db6de89956b1de3ecf9f2d0a.tar.gz rust-ce750a7dbcd2dc68db6de89956b1de3ecf9f2d0a.zip | |
Box AST idents
Diffstat (limited to 'src/libsyntax/parse/common.rs')
| -rw-r--r-- | src/libsyntax/parse/common.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/common.rs b/src/libsyntax/parse/common.rs index 0520993de74..c8e62a2245d 100644 --- a/src/libsyntax/parse/common.rs +++ b/src/libsyntax/parse/common.rs @@ -81,7 +81,7 @@ impl parser_common for parser { fn token_is_keyword(word: str, ++tok: token::token) -> bool { self.require_keyword(word); alt tok { - token::IDENT(sid, false) { str::eq(word, self.get_str(sid)) } + token::IDENT(sid, false) { str::eq(word, *self.get_str(sid)) } _ { false } } } @@ -97,7 +97,7 @@ impl parser_common for parser { // workaround LLVM bug #13042 alt @self.token { @token::IDENT(sid, false) { - if str::eq(word, self.get_str(sid)) { + if str::eq(word, *self.get_str(sid)) { self.bump(); ret true; } else { ret false; } @@ -128,7 +128,7 @@ impl parser_common for parser { } } - fn check_restricted_keywords_(w: ast::ident) { + fn check_restricted_keywords_(w: str) { if self.is_restricted_keyword(w) { self.fatal("found `" + w + "` in restricted position"); } |
