Skip to content

Commit 3f8d548

Browse files
committed
librustc: Remove some extra "copy" keywords that came in before this change merged.
1 parent 66a9b7d commit 3f8d548

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/librustc/middle/const_eval.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,11 @@ pub fn lookup_variant_by_id(tcx: ty::ctxt,
204204
capture_map: @mut HashMap::new()
205205
};
206206
match csearch::maybe_get_item_ast(tcx, enum_def,
207-
|a, b, c, d| astencode::decode_inlined_item(a, b, maps, /*bar*/ copy c, d)) {
207+
|a, b, c, d| astencode::decode_inlined_item(a,
208+
b,
209+
maps,
210+
/*bad*/ c.clone(),
211+
d)) {
208212
csearch::found(ast::ii_item(item)) => match item.node {
209213
item_enum(ast::enum_def { variants: ref variants }, _) => {
210214
variant_expr(*variants, variant_def.node)

src/librustc/middle/lint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pub enum level {
112112
allow, warn, deny, forbid
113113
}
114114

115-
#[deriving(Eq)]
115+
#[deriving(Clone, Eq)]
116116
pub struct LintSpec {
117117
lint: lint,
118118
desc: &'static str,

src/librustpkg/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ fn command_line_test_with_env(args: &[~str], cwd: &Path, env: Option<~[(~str, ~s
221221
let cwd = normalize(RemotePath((*cwd).clone()));
222222
debug!("About to run command: %? %? in %s", cmd, args, cwd.to_str());
223223
assert!(os::path_is_dir(&*cwd));
224-
let cwd = cwd.clone();
224+
let cwd = (*cwd).clone();
225225
let mut prog = run::Process::new(cmd, args, run::ProcessOptions {
226226
env: env.map(|v| v.slice(0, v.len())),
227227
dir: Some(&cwd),

src/test/bench/shootout-k-nucleotide-pipes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fn sort_and_fmt(mm: &HashMap<~[u8], uint>, total: uint) -> ~str {
6363

6464
// map -> [(k,%)]
6565
for mm.iter().advance |(key, &val)| {
66-
pairs.push((copy *key, pct(val, total)));
66+
pairs.push(((*key).clone(), pct(val, total)));
6767
}
6868

6969
let pairs_sorted = sortKV(pairs);

0 commit comments

Comments
 (0)