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/tt | |
| 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/tt')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 5 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/transcribe.rs | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index a2e3d7bfeca..6b3ce1c9a2f 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -53,8 +53,9 @@ pub fn add_new_extension(cx: @ExtCtxt, // Parse the macro_rules! invocation (`none` is for no interpolations): - let arg_reader = new_tt_reader(copy cx.parse_sess().span_diagnostic, - None, copy arg); + let arg_reader = new_tt_reader(cx.parse_sess().span_diagnostic, + None, + copy arg); let argument_map = parse_or_else(cx.parse_sess(), cx.cfg(), arg_reader as @reader, diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs index 92feaa154fe..94ecff178ea 100644 --- a/src/libsyntax/ext/tt/transcribe.rs +++ b/src/libsyntax/ext/tt/transcribe.rs @@ -285,7 +285,7 @@ pub fn tt_next_token(r: &mut TtReader) -> TokenAndSpan { } matched_seq(*) => { r.sp_diag.span_fatal( - copy r.cur_span, /* blame the macro writer */ + r.cur_span, /* blame the macro writer */ fmt!("variable '%s' is still repeating at this depth", ident_to_str(&ident))); } |
