Auto merge of #123674 - oli-obk:bogus_note, r=estebank
Silence some follow-up errors on trait impls in case the trait has conflicting or otherwise incoherent impls fixes #123292 Also removes a bunch of extra diagnostics that were introduced in https://github.com/rust-lang/rust/pull/121154 and https://github.com/rust-lang/rust/pull/120558
This commit is contained in:
commit
00ed4edb44
11 changed files with 55 additions and 109 deletions
|
@ -660,8 +660,14 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) {
|
|||
}
|
||||
DefKind::Impl { of_trait } => {
|
||||
if of_trait && let Some(impl_trait_header) = tcx.impl_trait_header(def_id) {
|
||||
check_impl_items_against_trait(tcx, def_id, impl_trait_header);
|
||||
check_on_unimplemented(tcx, def_id);
|
||||
if tcx
|
||||
.ensure()
|
||||
.coherent_trait(impl_trait_header.trait_ref.instantiate_identity().def_id)
|
||||
.is_ok()
|
||||
{
|
||||
check_impl_items_against_trait(tcx, def_id, impl_trait_header);
|
||||
check_on_unimplemented(tcx, def_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
DefKind::Trait => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue