Skip to content

Commit a0130e6

Browse files
committed
Check all operands, they may contain indirections in their place
1 parent cd928b0 commit a0130e6

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

compiler/rustc_borrowck/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -592,8 +592,7 @@ impl<'cx, 'tcx> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx> for MirBorrowckCtx
592592
);
593593
}
594594
StatementKind::Intrinsic(box ref kind) => match kind {
595-
// Takes a `bool` argument, and has no return value, thus being irrelevant for borrowck
596-
NonDivergingIntrinsic::Assume(..) => {},
595+
NonDivergingIntrinsic::Assume(op) => self.consume_operand(location, (op, span), flow_state),
597596
NonDivergingIntrinsic::CopyNonOverlapping(..) => span_bug!(
598597
span,
599598
"Unexpected CopyNonOverlapping, should only appear after lower_intrinsics",

compiler/rustc_borrowck/src/type_check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
13031303
}
13041304
}
13051305
StatementKind::Intrinsic(box ref kind) => match kind {
1306-
NonDivergingIntrinsic::Assume(..) => {}
1306+
NonDivergingIntrinsic::Assume(op) => self.check_operand(op, location),
13071307
NonDivergingIntrinsic::CopyNonOverlapping(..) => span_bug!(
13081308
stmt.source_info.span,
13091309
"Unexpected NonDivergingIntrinsic::CopyNonOverlapping, should only appear after lowering_intrinsics",

0 commit comments

Comments
 (0)