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/pipes/liveness.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/pipes/liveness.rs')
| -rw-r--r-- | src/libsyntax/ext/pipes/liveness.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/ext/pipes/liveness.rs b/src/libsyntax/ext/pipes/liveness.rs index b1f98d78fb3..6a8f3c89a2f 100644 --- a/src/libsyntax/ext/pipes/liveness.rs +++ b/src/libsyntax/ext/pipes/liveness.rs @@ -45,7 +45,7 @@ use extra::bitv::Bitv; pub fn analyze(proto: @mut protocol_, _cx: @ExtCtxt) { debug!("initializing colive analysis"); let num_states = proto.num_states(); - let mut colive: ~[~Bitv] = do (copy proto.states).iter().transform() |state| { + let mut colive: ~[~Bitv] = do proto.states.iter().transform() |state| { let mut bv = ~Bitv::new(num_states, false); for state.reachable |s| { bv.set(s.id, true); @@ -85,10 +85,11 @@ pub fn analyze(proto: @mut protocol_, _cx: @ExtCtxt) { } if self_live.len() > 0 { - let states = self_live.map(|s| copy s.name).connect(" "); + let states = self_live.map(|s| s.name).connect(" "); debug!("protocol %s is unbounded due to loops involving: %s", - copy proto.name, states); + proto.name, + states); // Someday this will be configurable with a warning //cx.span_warn(empty_span(), @@ -98,9 +99,8 @@ pub fn analyze(proto: @mut protocol_, _cx: @ExtCtxt) { // states)); proto.bounded = Some(false); - } - else { - debug!("protocol %s is bounded. yay!", copy proto.name); + } else { + debug!("protocol %s is bounded. yay!", proto.name); proto.bounded = Some(true); } } |
