summary refs log tree commit diff
path: root/src/libsyntax/parse/attr.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/attr.rs
parent363e67273622285a65caa74bb63ecfa04df59055 (diff)
downloadrust-8f80323f09ef150efc5cf729100f99981afc96e1.tar.gz
rust-8f80323f09ef150efc5cf729100f99981afc96e1.zip
Remove unnecessary allocations flagged by lint
Diffstat (limited to 'src/libsyntax/parse/attr.rs')
-rw-r--r--src/libsyntax/parse/attr.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs
index d947fa43ca7..ed9a83d6b1e 100644
--- a/src/libsyntax/parse/attr.rs
+++ b/src/libsyntax/parse/attr.rs
@@ -42,7 +42,7 @@ impl parser_attr for Parser {
                 if self.look_ahead(1u) != token::LBRACKET {
                     break;
                 }
-                attrs += ~[self.parse_attribute(ast::attr_outer)];
+                attrs += [self.parse_attribute(ast::attr_outer)];
               }
               token::DOC_COMMENT(s) => {
                 let attr = ::attr::mk_sugared_doc_attr(
@@ -53,7 +53,7 @@ impl parser_attr for Parser {
                 if attr.node.style != ast::attr_outer {
                   self.fatal("expected outer comment");
                 }
-                attrs += ~[attr];
+                attrs += [attr];
                 self.bump();
               }
               _ => break
@@ -105,7 +105,7 @@ impl parser_attr for Parser {
                 let attr = self.parse_attribute(ast::attr_inner);
                 if *self.token == token::SEMI {
                     self.bump();
-                    inner_attrs += ~[attr];
+                    inner_attrs += [attr];
                 } else {
                     // It's not really an inner attribute
                     let outer_attr =
@@ -113,7 +113,7 @@ impl parser_attr for Parser {
                             ast::attribute_ { style: ast::attr_outer,
                                               value: attr.node.value,
                                               is_sugared_doc: false });
-                    next_outer_attrs += ~[outer_attr];
+                    next_outer_attrs += [outer_attr];
                     break;
                 }
               }
@@ -125,9 +125,9 @@ impl parser_attr for Parser {
                 );
                 self.bump();
                 if attr.node.style == ast::attr_inner {
-                  inner_attrs += ~[attr];
+                  inner_attrs += [attr];
                 } else {
-                  next_outer_attrs += ~[attr];
+                  next_outer_attrs += [attr];
                   break;
                 }
               }