From 1ffd90edbc5494d54ab911e9931c296aca7a7707 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 19 Sep 2012 15:13:04 -0700 Subject: Remove redundant hashmap constructor functions. --- src/libsyntax/parse/parser.rs | 2 +- src/libsyntax/parse/token.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 06e68a09abe..0902567e864 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2,7 +2,7 @@ use print::pprust::expr_to_str; use result::Result; use either::{Either, Left, Right}; -use std::map::{HashMap, str_hash}; +use std::map::HashMap; use token::{can_begin_expr, is_ident, is_ident_or_path, is_plain_ident, INTERPOLATED, special_idents}; use codemap::{span,fss_none}; diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index c7ecc5ae548..2bd5d155063 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -1,6 +1,6 @@ use util::interner; use util::interner::interner; -use std::map::{HashMap, str_hash}; +use std::map::HashMap; use std::serialization::{Serializer, Deserializer, serialize_uint, @@ -369,7 +369,7 @@ fn mk_fake_ident_interner() -> ident_interner { * the language and may not appear as identifiers. */ fn keyword_table() -> HashMap<~str, ()> { - let keywords = str_hash(); + let keywords = HashMap(); for temporary_keyword_table().each_key |word| { keywords.insert(word, ()); } @@ -384,7 +384,7 @@ fn keyword_table() -> HashMap<~str, ()> { /// Keywords that may be used as identifiers fn temporary_keyword_table() -> HashMap<~str, ()> { - let words = str_hash(); + let words = HashMap(); let keys = ~[ ~"self", ~"static", ]; @@ -396,7 +396,7 @@ fn temporary_keyword_table() -> HashMap<~str, ()> { /// Full keywords. May not appear anywhere else. fn strict_keyword_table() -> HashMap<~str, ()> { - let words = str_hash(); + let words = HashMap(); let keys = ~[ ~"as", ~"assert", ~"break", @@ -421,7 +421,7 @@ fn strict_keyword_table() -> HashMap<~str, ()> { } fn reserved_keyword_table() -> HashMap<~str, ()> { - let words = str_hash(); + let words = HashMap(); let keys = ~[ ~"be" ]; -- cgit 1.4.1-3-g733a5