about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-09-19 15:13:04 -0700
committerGraydon Hoare <graydon@mozilla.com>2012-09-19 15:51:44 -0700
commit1ffd90edbc5494d54ab911e9931c296aca7a7707 (patch)
tree7d6cf224429bdc7f26cef9b91ccd170a9318b7e6 /src/libsyntax/parse
parent384906c1e807196fbb8653e3233c92f920888d40 (diff)
downloadrust-1ffd90edbc5494d54ab911e9931c296aca7a7707.tar.gz
rust-1ffd90edbc5494d54ab911e9931c296aca7a7707.zip
Remove redundant hashmap constructor functions.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs2
-rw-r--r--src/libsyntax/parse/token.rs10
2 files changed, 6 insertions, 6 deletions
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"
     ];