diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-05-12 00:25:31 -0400 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-05-14 12:24:43 -0400 |
| commit | 92d39fe4d5e5ad3d2c2dcafe45eaf6e23edddfd7 (patch) | |
| tree | 817ebba2489c228d8494662b4ce188e0782b321a /src/libsyntax/parse/obsolete.rs | |
| parent | 2951527528b39dbf47c02b3d329129d677ddcdfd (diff) | |
| download | rust-92d39fe4d5e5ad3d2c2dcafe45eaf6e23edddfd7.tar.gz rust-92d39fe4d5e5ad3d2c2dcafe45eaf6e23edddfd7.zip | |
syntax: Remove #[allow(vecs_implicitly_copyable)]
Diffstat (limited to 'src/libsyntax/parse/obsolete.rs')
| -rw-r--r-- | src/libsyntax/parse/obsolete.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs index 3e64133e893..211d123e887 100644 --- a/src/libsyntax/parse/obsolete.rs +++ b/src/libsyntax/parse/obsolete.rs @@ -253,9 +253,9 @@ pub impl Parser { } } - fn token_is_obsolete_ident(&self, ident: &str, token: Token) -> bool { - match token { - token::IDENT(copy sid, _) => { + fn token_is_obsolete_ident(&self, ident: &str, token: &Token) -> bool { + match *token { + token::IDENT(sid, _) => { str::eq_slice(*self.id_to_str(sid), ident) } _ => false @@ -263,7 +263,7 @@ pub impl Parser { } fn is_obsolete_ident(&self, ident: &str) -> bool { - self.token_is_obsolete_ident(ident, *self.token) + self.token_is_obsolete_ident(ident, self.token) } fn eat_obsolete_ident(&self, ident: &str) -> bool { @@ -289,7 +289,7 @@ pub impl Parser { fn try_parse_obsolete_with(&self) -> bool { if *self.token == token::COMMA && self.token_is_obsolete_ident("with", - self.look_ahead(1u)) { + &self.look_ahead(1u)) { self.bump(); } if self.eat_obsolete_ident("with") { @@ -301,13 +301,13 @@ pub impl Parser { } } - fn try_parse_obsolete_priv_section(&self, attrs: ~[attribute]) -> bool { + fn try_parse_obsolete_priv_section(&self, attrs: &[attribute]) -> bool { if self.is_keyword(&~"priv") && self.look_ahead(1) == token::LBRACE { self.obsolete(copy *self.span, ObsoletePrivSection); self.eat_keyword(&~"priv"); self.bump(); while *self.token != token::RBRACE { - self.parse_single_struct_field(ast::private, attrs); + self.parse_single_struct_field(ast::private, attrs.to_owned()); } self.bump(); true |
