Skip to content

Commit

Permalink
Check all operands, they may contain indirections in their place
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Sep 6, 2022
1 parent cd928b0 commit a0130e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit a0130e6

Please sign in to comment.