Skip to content

Commit ba259b9

Browse files
committed
allow normalizing NormalizesTo goals
1 parent a0fbaf0 commit ba259b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_middle/src/ty/predicate.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,10 @@ impl<'tcx> Predicate<'tcx> {
121121
/// unsoundly accept some programs. See #91068.
122122
#[inline]
123123
pub fn allow_normalization(self) -> bool {
124-
// Keep this in sync with the one in `rustc_type_ir::inherent`!
125124
match self.kind().skip_binder() {
126-
PredicateKind::Clause(ClauseKind::WellFormed(_))
127-
| PredicateKind::AliasRelate(..)
128-
| PredicateKind::NormalizesTo(..) => false,
125+
PredicateKind::Clause(ClauseKind::WellFormed(_)) | PredicateKind::AliasRelate(..) => {
126+
false
127+
}
129128
PredicateKind::Clause(ClauseKind::Trait(_))
130129
| PredicateKind::Clause(ClauseKind::HostEffect(..))
131130
| PredicateKind::Clause(ClauseKind::RegionOutlives(_))
@@ -137,6 +136,7 @@ impl<'tcx> Predicate<'tcx> {
137136
| PredicateKind::Coerce(_)
138137
| PredicateKind::Clause(ClauseKind::ConstEvaluatable(_))
139138
| PredicateKind::ConstEquate(_, _)
139+
| PredicateKind::NormalizesTo(..)
140140
| PredicateKind::Ambiguous => true,
141141
}
142142
}

0 commit comments

Comments
 (0)