Rustup (Clone is now a builtin trait)

This commit is contained in:
Oliver Schneider
2017-08-23 17:24:38 +02:00
parent 4cfda6ae96
commit 7b8e2c772d
2 changed files with 7 additions and 0 deletions
@@ -2270,6 +2270,12 @@ fn resolve_associated_item<'a, 'tcx>(
substs: rcvr_substs,
}
}
::rustc::traits::VtableBuiltin(..) if Some(trait_id) == tcx.lang_items.clone_trait() => {
ty::Instance {
def: ty::InstanceDef::CloneShim(def_id, trait_ref.self_ty()),
substs: rcvr_substs
}
}
_ => bug!("static call to invalid vtable: {:?}", vtbl),
}
}
@@ -297,6 +297,7 @@ fn eval_fn_call(
}
Ok(())
}
ty::InstanceDef::CloneShim(..) |
ty::InstanceDef::Item(_) => {
let mut args = Vec::new();
for arg in arg_operands {