diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs index 3b2bcd7e6d3..ec652f85217 100644 --- a/compiler/rustc_borrowck/src/lib.rs +++ b/compiler/rustc_borrowck/src/lib.rs @@ -592,8 +592,7 @@ impl<'cx, 'tcx> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx> for MirBorrowckCtx ); } StatementKind::Intrinsic(box ref kind) => match kind { - // Takes a `bool` argument, and has no return value, thus being irrelevant for borrowck - NonDivergingIntrinsic::Assume(..) => {}, + NonDivergingIntrinsic::Assume(op) => self.consume_operand(location, (op, span), flow_state), NonDivergingIntrinsic::CopyNonOverlapping(..) => span_bug!( span, "Unexpected CopyNonOverlapping, should only appear after lower_intrinsics", diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index 2ba9b2be901..fc0e95f30c9 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -1303,7 +1303,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { } } StatementKind::Intrinsic(box ref kind) => match kind { - NonDivergingIntrinsic::Assume(..) => {} + NonDivergingIntrinsic::Assume(op) => self.check_operand(op, location), NonDivergingIntrinsic::CopyNonOverlapping(..) => span_bug!( stmt.source_info.span, "Unexpected NonDivergingIntrinsic::CopyNonOverlapping, should only appear after lowering_intrinsics",