Skip to content

Commit ede0556

Browse files
committed
Effects are boolean consts and don't contain opaque types
1 parent 0183d92 commit ede0556

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: compiler/rustc_hir_typeck/src/callee.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
918918

919919
let param = callee_args.const_at(host_effect_index);
920920
let cause = self.misc(span);
921-
match self.at(&cause, self.param_env).eq(infer::DefineOpaqueTypes::No, effect, param) {
921+
// We know the type of `effect` to be `bool`, there will be no opaque type inference.
922+
match self.at(&cause, self.param_env).eq(infer::DefineOpaqueTypes::Yes, effect, param) {
922923
Ok(infer::InferOk { obligations, value: () }) => {
923924
self.register_predicates(obligations);
924925
}

0 commit comments

Comments
 (0)