提交 3f8d5489 编写于 作者: P Patrick Walton

librustc: Remove some extra "copy" keywords that came in before this change merged.

上级 66a9b7d5
......@@ -204,7 +204,11 @@ fn variant_expr(variants: &[ast::variant], id: ast::node_id) -> Option<@expr> {
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)
......
......@@ -112,7 +112,7 @@ pub enum level {
allow, warn, deny, forbid
}
#[deriving(Eq)]
#[deriving(Clone, Eq)]
pub struct LintSpec {
lint: lint,
desc: &'static str,
......
......@@ -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),
......
......@@ -63,7 +63,7 @@ fn sortKV<TT:Clone + Ord, UU:Clone + Ord>(orig: ~[(TT,UU)]) -> ~[(TT,UU)] {
// 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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册