diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-06-27 17:41:35 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-07-17 14:56:42 -0700 |
| commit | b4e674f6e662bc80f2e7a5a1a9834f2152f08d32 (patch) | |
| tree | 1b567620d7ea1641fa58338b8f6e5c68bb324248 /src/libsyntax/ext/build.rs | |
| parent | 8c082658bed1877d5741f7badceb8efc3015598d (diff) | |
| download | rust-b4e674f6e662bc80f2e7a5a1a9834f2152f08d32.tar.gz rust-b4e674f6e662bc80f2e7a5a1a9834f2152f08d32.zip | |
librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.
Diffstat (limited to 'src/libsyntax/ext/build.rs')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 83fce24bef8..89290b78b72 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -347,7 +347,7 @@ impl AstBuilder for @ExtCtxt { fn strip_bounds(&self, generics: &Generics) -> Generics { let new_params = do generics.ty_params.map |ty_param| { - ast::TyParam { bounds: opt_vec::Empty, ..copy *ty_param } + ast::TyParam { bounds: opt_vec::Empty, ..*ty_param } }; Generics { ty_params: new_params, @@ -611,13 +611,13 @@ impl AstBuilder for @ExtCtxt { } fn lambda0(&self, _span: span, blk: ast::blk) -> @ast::expr { let ext_cx = *self; - let blk_e = self.expr(copy blk.span, ast::expr_block(copy blk)); + let blk_e = self.expr(blk.span, ast::expr_block(copy blk)); quote_expr!(|| $blk_e ) } fn lambda1(&self, _span: span, blk: ast::blk, ident: ast::ident) -> @ast::expr { let ext_cx = *self; - let blk_e = self.expr(copy blk.span, ast::expr_block(copy blk)); + let blk_e = self.expr(blk.span, ast::expr_block(copy blk)); quote_expr!(|$ident| $blk_e ) } |
