Skip to content

Commit 6eefaa7

Browse files
committed
Effects are boolean consts and don't contain opaque types
1 parent 824e444 commit 6eefaa7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_hir_typeck/src/callee.rs

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

910910
let param = callee_args.const_at(host_effect_index);
911911
let cause = self.misc(span);
912-
match self.at(&cause, self.param_env).eq(infer::DefineOpaqueTypes::No, effect, param) {
912+
// We know the type of `effect` to be `bool`, there will be no opaque type inference.
913+
match self.at(&cause, self.param_env).eq(infer::DefineOpaqueTypes::Yes, effect, param) {
913914
Ok(infer::InferOk { obligations, value: () }) => {
914915
self.register_predicates(obligations);
915916
}

0 commit comments

Comments
 (0)