Use != Positive rather than == Negative
Feels more complete, and for ImplPolarity has the side-effect of making sure we also handle reservation impls correctly
This commit is contained in:
@@ -295,7 +295,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
|
||||
}) = impl_source
|
||||
{
|
||||
// Blame 'tidy' for the weird bracket placement.
|
||||
if infcx.tcx.impl_polarity(*impl_def_id) == ty::ImplPolarity::Negative {
|
||||
if infcx.tcx.impl_polarity(*impl_def_id) != ty::ImplPolarity::Positive {
|
||||
debug!(
|
||||
"evaluate_nested_obligations: found explicit negative impl\
|
||||
{:?}, bailing out",
|
||||
|
||||
Reference in New Issue
Block a user