mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 22:18:23 +03:00
Rustup (Clone is now a builtin trait)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user