Skip to content

Commit

Permalink
librustc: Remove some extra "copy" keywords that came in before this …
Browse files Browse the repository at this point in the history
…change merged.
  • Loading branch information
pcwalton committed Jul 17, 2013
1 parent 66a9b7d commit 3f8d548
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/librustc/middle/const_eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub enum level {
allow, warn, deny, forbid
}

#[deriving(Eq)]
#[deriving(Clone, Eq)]
pub struct LintSpec {
lint: lint,
desc: &'static str,
Expand Down
2 changes: 1 addition & 1 deletion src/librustpkg/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/test/bench/shootout-k-nucleotide-pipes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3f8d548

Please sign in to comment.