Auto merge of #108128 - clubby789:builtin-derived-attr, r=jackh726
Properly check for builtin derived code Fixes #108122
This commit is contained in:
commit
21e5b941e0
8 changed files with 60 additions and 34 deletions
|
@ -2104,7 +2104,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
// Ignore automatically derived impls and `!Trait` impls.
|
||||
.filter(|&def_id| {
|
||||
self.tcx.impl_polarity(def_id) != ty::ImplPolarity::Negative
|
||||
|| self.tcx.is_builtin_derive(def_id)
|
||||
|| self.tcx.is_automatically_derived(def_id)
|
||||
})
|
||||
.filter_map(|def_id| self.tcx.impl_trait_ref(def_id))
|
||||
.map(ty::EarlyBinder::subst_identity)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue