diff options
Diffstat (limited to 'src/libsyntax/parse/common.rs')
| -rw-r--r-- | src/libsyntax/parse/common.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/parse/common.rs b/src/libsyntax/parse/common.rs index ea599e8290a..c14c7bed139 100644 --- a/src/libsyntax/parse/common.rs +++ b/src/libsyntax/parse/common.rs @@ -129,7 +129,7 @@ pub impl Parser { // A sanity check that the word we are asking for is a known keyword fn require_keyword(&self, word: &~str) { - if !self.keywords.contains_key(word) { + if !self.keywords.contains(word) { self.bug(fmt!("unknown keyword: %s", *word)); } } @@ -153,7 +153,7 @@ pub impl Parser { fn is_any_keyword(&self, tok: &token::Token) -> bool { match *tok { token::IDENT(sid, false) => { - self.keywords.contains_key(self.id_to_str(sid)) + self.keywords.contains(self.id_to_str(sid)) } _ => false } @@ -183,7 +183,7 @@ pub impl Parser { } fn is_strict_keyword(&self, word: &~str) -> bool { - self.strict_keywords.contains_key(word) + self.strict_keywords.contains(word) } fn check_strict_keywords(&self) { @@ -203,7 +203,7 @@ pub impl Parser { } fn is_reserved_keyword(&self, word: &~str) -> bool { - self.reserved_keywords.contains_key(word) + self.reserved_keywords.contains(word) } fn check_reserved_keywords(&self) { |
