Skip to content

Commit 24d2ac0

Browse files
committedJul 15, 2024
Auto merge of #127777 - matthiaskrgr:rollup-qp2vkan, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #124921 (offset_from: always allow pointers to point to the same address) - #127407 (Make parse error suggestions verbose and fix spans) - #127684 (consolidate miri-unleashed tests for mutable refs into one file) - #127729 (Stop using the `gen` identifier in the compiler) - #127736 (Add myself to the review rotation) - #127758 (coverage: Restrict `ExpressionUsed` simplification to `Code` mappings) r? `@ghost` `@rustbot` modify labels: rollup
2 parents eb72697 + e5d65e4 commit 24d2ac0

File tree

199 files changed

+3635
-1359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+3635
-1359
lines changed
 

‎compiler/rustc_borrowck/src/dataflow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ impl<'tcx> rustc_mir_dataflow::GenKillAnalysis<'tcx> for Borrows<'_, '_, 'tcx> {
553553
panic!("could not find BorrowIndex for location {location:?}");
554554
});
555555

556-
trans.gen(index);
556+
trans.gen_(index);
557557
}
558558

559559
// Make sure there are no remaining borrows for variables

‎compiler/rustc_codegen_llvm/src/coverageinfo/map_data.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,15 @@ impl<'tcx> FunctionCoverageCollector<'tcx> {
6666
// For each expression ID that is directly used by one or more mappings,
6767
// mark it as not-yet-seen. This indicates that we expect to see a
6868
// corresponding `ExpressionUsed` statement during MIR traversal.
69-
for term in function_coverage_info.mappings.iter().flat_map(|m| m.kind.terms()) {
70-
if let CovTerm::Expression(id) = term {
69+
for mapping in function_coverage_info.mappings.iter() {
70+
// Currently we only worry about ordinary code mappings.
71+
// For branch and MC/DC mappings, expressions might not correspond
72+
// to any particular point in the control-flow graph.
73+
// (Keep this in sync with the injection of `ExpressionUsed`
74+
// statements in the `InstrumentCoverage` MIR pass.)
75+
if let MappingKind::Code(term) = mapping.kind
76+
&& let CovTerm::Expression(id) = term
77+
{
7178
expressions_seen.remove(id);
7279
}
7380
}

0 commit comments

Comments
 (0)