about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorSeo Sanghyeon <sanxiyn@gmail.com>2013-05-24 01:09:11 +0900
committerSeo Sanghyeon <sanxiyn@gmail.com>2013-05-28 03:14:44 +0900
commit8f80323f09ef150efc5cf729100f99981afc96e1 (patch)
tree146beb099875fb28ff9eae1d4b5a72b6b624b3c3 /src/libsyntax/parse/parser.rs
parent363e67273622285a65caa74bb63ecfa04df59055 (diff)
downloadrust-8f80323f09ef150efc5cf729100f99981afc96e1.tar.gz
rust-8f80323f09ef150efc5cf729100f99981afc96e1.zip
Remove unnecessary allocations flagged by lint
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index e8b200439d6..1af0cfab273 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3584,7 +3584,7 @@ pub impl Parser {
         let prefix = prefix.dir_path();
         let mod_path_stack = &*self.mod_path_stack;
         let mod_path = Path(".").push_many(*mod_path_stack);
-        let default_path = *self.sess.interner.get(id) + ~".rs";
+        let default_path = *self.sess.interner.get(id) + ".rs";
         let file_path = match ::attr::first_attr_value_str_by_name(
             outer_attrs, "path") {
             Some(d) => {
@@ -4213,8 +4213,8 @@ pub impl Parser {
         // FAILURE TO PARSE ITEM
         if visibility != inherited {
             let mut s = ~"unmatched visibility `";
-            s += if visibility == public { ~"pub" } else { ~"priv" };
-            s += ~"`";
+            s += if visibility == public { "pub" } else { "priv" };
+            s += "`";
             self.span_fatal(*self.last_span, s);
         }
         return iovi_none;