From 3f8d548914fac1e7c32fcd9a903590d0fe21c64f Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 16 Jul 2013 23:49:42 -0700 Subject: [PATCH] librustc: Remove some extra "copy" keywords that came in before this change merged. --- src/librustc/middle/const_eval.rs | 6 +++++- src/librustc/middle/lint.rs | 2 +- src/librustpkg/tests.rs | 2 +- src/test/bench/shootout-k-nucleotide-pipes.rs | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/librustc/middle/const_eval.rs b/src/librustc/middle/const_eval.rs index ffec833c2a5..e68a1f393d2 100644 --- a/src/librustc/middle/const_eval.rs +++ b/src/librustc/middle/const_eval.rs @@ -204,7 +204,11 @@ pub fn lookup_variant_by_id(tcx: ty::ctxt, capture_map: @mut HashMap::new() }; match csearch::maybe_get_item_ast(tcx, enum_def, - |a, b, c, d| astencode::decode_inlined_item(a, b, maps, /*bar*/ copy c, d)) { + |a, b, c, d| astencode::decode_inlined_item(a, + b, + maps, + /*bad*/ c.clone(), + d)) { csearch::found(ast::ii_item(item)) => match item.node { item_enum(ast::enum_def { variants: ref variants }, _) => { variant_expr(*variants, variant_def.node) diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs index 17563d7c89c..486939be58d 100644 --- a/src/librustc/middle/lint.rs +++ b/src/librustc/middle/lint.rs @@ -112,7 +112,7 @@ pub enum level { allow, warn, deny, forbid } -#[deriving(Eq)] +#[deriving(Clone, Eq)] pub struct LintSpec { lint: lint, desc: &'static str, diff --git a/src/librustpkg/tests.rs b/src/librustpkg/tests.rs index 7c75b9c34b3..f6044cbf01f 100644 --- a/src/librustpkg/tests.rs +++ b/src/librustpkg/tests.rs @@ -221,7 +221,7 @@ fn command_line_test_with_env(args: &[~str], cwd: &Path, env: Option<~[(~str, ~s let cwd = normalize(RemotePath((*cwd).clone())); debug!("About to run command: %? %? in %s", cmd, args, cwd.to_str()); assert!(os::path_is_dir(&*cwd)); - let cwd = cwd.clone(); + let cwd = (*cwd).clone(); let mut prog = run::Process::new(cmd, args, run::ProcessOptions { env: env.map(|v| v.slice(0, v.len())), dir: Some(&cwd), diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs index 6a09238c2f2..a3755919ffe 100644 --- a/src/test/bench/shootout-k-nucleotide-pipes.rs +++ b/src/test/bench/shootout-k-nucleotide-pipes.rs @@ -63,7 +63,7 @@ fn sort_and_fmt(mm: &HashMap<~[u8], uint>, total: uint) -> ~str { // map -> [(k,%)] for mm.iter().advance |(key, &val)| { - pairs.push((copy *key, pct(val, total))); + pairs.push(((*key).clone(), pct(val, total))); } let pairs_sorted = sortKV(pairs);