diff options
| author | bors <bors@rust-lang.org> | 2013-02-09 15:02:51 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-02-09 15:02:51 -0800 |
| commit | d6442e97a50561e8b42e145c2761d9e14233c4c1 (patch) | |
| tree | 187ce1b6632bec9577819378aecaed51b178d3b9 /src/libsyntax/parse | |
| parent | 7fe6b1b6cfcdf52fd99f02b1d999c480e134e30f (diff) | |
| parent | 4e6994dbfa3c32ef6a560c9ab2d940a5b032eef4 (diff) | |
| download | rust-d6442e97a50561e8b42e145c2761d9e14233c4c1.tar.gz rust-d6442e97a50561e8b42e145c2761d9e14233c4c1.zip | |
auto merge of #4854 : thestinger/rust/oldmap, r=catamorphism
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/common.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/parse/obsolete.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/parse/common.rs b/src/libsyntax/parse/common.rs index d82a5a18039..e0d53fadfa0 100644 --- a/src/libsyntax/parse/common.rs +++ b/src/libsyntax/parse/common.rs @@ -96,7 +96,7 @@ pub impl Parser { // A sanity check that the word we are asking for is a known keyword fn require_keyword(word: ~str) { - if !self.keywords.contains_key_ref(&word) { + if !self.keywords.contains_key(&word) { self.bug(fmt!("unknown keyword: %s", word)); } } @@ -120,7 +120,7 @@ pub impl Parser { fn is_any_keyword(tok: token::Token) -> bool { match tok { token::IDENT(sid, false) => { - self.keywords.contains_key_ref(self.id_to_str(sid)) + self.keywords.contains_key(self.id_to_str(sid)) } _ => false } @@ -146,7 +146,7 @@ pub impl Parser { } fn is_strict_keyword(word: ~str) -> bool { - self.strict_keywords.contains_key_ref(&word) + self.strict_keywords.contains_key(&word) } fn check_strict_keywords() { @@ -166,7 +166,7 @@ pub impl Parser { } fn is_reserved_keyword(word: ~str) -> bool { - self.reserved_keywords.contains_key_ref(&word) + self.reserved_keywords.contains_key(&word) } fn check_reserved_keywords() { diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs index cdde542bb1f..9b2040fed1a 100644 --- a/src/libsyntax/parse/obsolete.rs +++ b/src/libsyntax/parse/obsolete.rs @@ -137,7 +137,7 @@ pub impl Parser { desc: &str) { self.span_err(sp, fmt!("obsolete syntax: %s", kind_str)); - if !self.obsolete_set.contains_key_ref(&kind) { + if !self.obsolete_set.contains_key(&kind) { self.sess.span_diagnostic.handler().note(fmt!("%s", desc)); self.obsolete_set.insert(kind, ()); } diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 49de7264d2c..b8d756d893a 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -455,13 +455,13 @@ pub fn mk_fake_ident_interner() -> @ident_interner { */ pub fn keyword_table() -> HashMap<~str, ()> { let keywords = HashMap(); - for temporary_keyword_table().each_key_ref |&word| { + for temporary_keyword_table().each_key |&word| { keywords.insert(word, ()); } - for strict_keyword_table().each_key_ref |&word| { + for strict_keyword_table().each_key |&word| { keywords.insert(word, ()); } - for reserved_keyword_table().each_key_ref |&word| { + for reserved_keyword_table().each_key |&word| { keywords.insert(word, ()); } keywords |
