Properly check for builtin derives
This commit is contained in:
parent
999ac5f777
commit
90f642bb3d
8 changed files with 60 additions and 34 deletions
|
@ -2097,7 +2097,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