Assert that various types have the right amount of generic args and fix the sites that used the wrong amount
This commit is contained in:
parent
d9a02b0fb7
commit
6f77c97b38
27 changed files with 153 additions and 144 deletions
|
@ -29,10 +29,7 @@ fn custom_coerce_unsize_info<'tcx>(
|
|||
) -> CustomCoerceUnsized {
|
||||
let def_id = tcx.require_lang_item(LangItem::CoerceUnsized, None);
|
||||
|
||||
let trait_ref = ty::Binder::dummy(ty::TraitRef {
|
||||
def_id,
|
||||
substs: tcx.mk_substs_trait(source_ty, &[target_ty.into()]),
|
||||
});
|
||||
let trait_ref = ty::Binder::dummy(tcx.mk_trait_ref(def_id, source_ty, &[target_ty.into()]));
|
||||
|
||||
match tcx.codegen_select_candidate((ty::ParamEnv::reveal_all(), trait_ref)) {
|
||||
Ok(traits::ImplSource::UserDefined(traits::ImplSourceUserDefinedData {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue