Apply EarlyBinder
only to TraitRef
in ImplTraitHeader
This commit is contained in:
parent
8c9a75b323
commit
9669934798
22 changed files with 74 additions and 82 deletions
|
@ -134,11 +134,12 @@ fn coherent_trait(tcx: TyCtxt<'_>, def_id: DefId) -> Result<(), ErrorGuaranteed>
|
|||
let mut res = tcx.ensure().specialization_graph_of(def_id);
|
||||
|
||||
for &impl_def_id in impls {
|
||||
let trait_header = tcx.impl_trait_header(impl_def_id).unwrap().instantiate_identity();
|
||||
let trait_def = tcx.trait_def(trait_header.trait_ref.def_id);
|
||||
let trait_header = tcx.impl_trait_header(impl_def_id).unwrap();
|
||||
let trait_ref = trait_header.trait_ref.instantiate_identity();
|
||||
let trait_def = tcx.trait_def(trait_ref.def_id);
|
||||
|
||||
res = res.and(check_impl(tcx, impl_def_id, trait_header.trait_ref, trait_def));
|
||||
res = res.and(check_object_overlap(tcx, impl_def_id, trait_header.trait_ref));
|
||||
res = res.and(check_impl(tcx, impl_def_id, trait_ref, trait_def));
|
||||
res = res.and(check_object_overlap(tcx, impl_def_id, trait_ref));
|
||||
|
||||
res = res.and(unsafety::check_item(tcx, impl_def_id, trait_header, trait_def));
|
||||
res = res.and(tcx.ensure().orphan_check_impl(impl_def_id));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue