about summary refs log tree commit diff
path: root/src/libsyntax/parse/attr.rs
diff options
context:
space:
mode:
authorEric Holk <eric.holk@gmail.com>2012-06-27 23:09:51 -0700
committerEric Holk <eric.holk@gmail.com>2012-06-27 23:09:51 -0700
commitae06546bbf72ed9eb8bf4086eaccf67703bf84ef (patch)
tree017518fabfda8abf92c61ba03872d6a39f735ec8 /src/libsyntax/parse/attr.rs
parent0b84437b68f4b54e05eb4639230c46b925abf902 (diff)
downloadrust-ae06546bbf72ed9eb8bf4086eaccf67703bf84ef.tar.gz
rust-ae06546bbf72ed9eb8bf4086eaccf67703bf84ef.zip
Replace more vector + (issue #2719)
Diffstat (limited to 'src/libsyntax/parse/attr.rs')
-rw-r--r--src/libsyntax/parse/attr.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs
index 4d78bcdc0a9..a349621091b 100644
--- a/src/libsyntax/parse/attr.rs
+++ b/src/libsyntax/parse/attr.rs
@@ -21,8 +21,8 @@ impl parser_attr for parser {
                 self.bump();
                 let first_attr =
                     self.parse_attribute_naked(ast::attr_outer, lo);
-                ret some(left([first_attr]/~ +
-                              self.parse_outer_attributes()));
+                ret some(left(vec::append([first_attr]/~,
+                                          self.parse_outer_attributes())));
             } else if !(self.look_ahead(1u) == token::LT
                         || self.look_ahead(1u) == token::LBRACKET
                         || self.look_ahead(1u) == token::POUND
@@ -38,7 +38,7 @@ impl parser_attr for parser {
         let mut attrs: [ast::attribute]/~ = []/~;
         while self.token == token::POUND
             && self.look_ahead(1u) == token::LBRACKET {
-            attrs += [self.parse_attribute(ast::attr_outer)]/~;
+            vec::push(attrs, self.parse_attribute(ast::attr_outer));
         }
         ret attrs;
     }
@@ -76,13 +76,13 @@ impl parser_attr for parser {
             let attr = self.parse_attribute(ast::attr_inner);
             if self.token == token::SEMI {
                 self.bump();
-                inner_attrs += [attr]/~;
+                vec::push(inner_attrs, attr);
             } else {
                 // It's not really an inner attribute
                 let outer_attr =
                     spanned(attr.span.lo, attr.span.hi,
                             {style: ast::attr_outer, value: attr.node.value});
-                next_outer_attrs += [outer_attr]/~;
+                vec::push(next_outer_attrs, outer_attr);
                 break;
             }
         }