diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-07-02 12:47:32 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-07-17 14:57:51 -0700 |
| commit | 99b33f721954bc5290f9201c8f64003c294d0571 (patch) | |
| tree | 786c9bf75d54512d0a80f6975ad40516ab432c3a /src/libsyntax/parse/attr.rs | |
| parent | b4e674f6e662bc80f2e7a5a1a9834f2152f08d32 (diff) | |
| download | rust-99b33f721954bc5290f9201c8f64003c294d0571.tar.gz rust-99b33f721954bc5290f9201c8f64003c294d0571.zip | |
librustc: Remove all uses of "copy".
Diffstat (limited to 'src/libsyntax/parse/attr.rs')
| -rw-r--r-- | src/libsyntax/parse/attr.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs index d33b72ae3c9..85c7d5de064 100644 --- a/src/libsyntax/parse/attr.rs +++ b/src/libsyntax/parse/attr.rs @@ -39,7 +39,7 @@ impl parser_attr for Parser { loop { match *self.token { token::POUND => { - if self.look_ahead(1u) != token::LBRACKET { + if self.look_ahead(1, |t| *t != token::LBRACKET) { break; } attrs.push(self.parse_attribute(ast::attr_outer)); @@ -96,7 +96,7 @@ impl parser_attr for Parser { loop { match *self.token { token::POUND => { - if self.look_ahead(1u) != token::LBRACKET { + if self.look_ahead(1, |t| *t != token::LBRACKET) { // This is an extension break; } @@ -162,12 +162,10 @@ impl parser_attr for Parser { // matches meta_seq = ( COMMASEP(meta_item) ) fn parse_meta_seq(&self) -> ~[@ast::meta_item] { - copy self.parse_seq( - &token::LPAREN, - &token::RPAREN, - seq_sep_trailing_disallowed(token::COMMA), - |p| p.parse_meta_item() - ).node + self.parse_seq(&token::LPAREN, + &token::RPAREN, + seq_sep_trailing_disallowed(token::COMMA), + |p| p.parse_meta_item()).node } fn parse_optional_meta(&self) -> ~[@ast::meta_item] { |
