Skip to content

Commit 5a496aa

Browse files
BoxyUwUJulianKnodt
authored andcommitted
dont skip const evalautable of non unevaluateds
1 parent e58b932 commit 5a496aa

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

compiler/rustc_trait_selection/src/traits/const_evaluatable.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,7 @@ fn satisfied_from_param_env<'tcx>(
157157
for pred in param_env.caller_bounds() {
158158
match pred.kind().skip_binder() {
159159
ty::PredicateKind::ConstEvaluatable(ce) => {
160-
let ty::ConstKind::Unevaluated(_) = ce.kind() else {
161-
continue
162-
};
163-
let Some(b_ct) = tcx.expand_abstract_consts(ce)? else {
164-
continue
165-
};
160+
let b_ct = tcx.expand_abstract_consts(ce)?.unwrap_or(ce);
166161

167162
let mut v = Visitor { ct, infcx, param_env };
168163
let result = b_ct.visit_with(&mut v);

0 commit comments

Comments
 (0)