Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 100fde5

Browse files
committedAug 28, 2024
Auto merge of #129691 - matthiaskrgr:rollup-owlcr3m, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - #129421 (add repr to the allowlist for naked functions) - #129480 (docs: correct panic conditions for rem_euclid and similar functions) - #129551 (ub_checks intrinsics: fall back to cfg(ub_checks)) - #129608 (const-eval: do not make UbChecks behavior depend on current crate's flags) - #129613 (interpret: do not make const-eval query result depend on tcx.sess) - #129641 (rustdoc: fix missing resource suffix on `crates.js`) - #129657 (Rename `BikeshedIntrinsicFrom` to `TransmuteFrom`) - #129666 (interpret: add missing alignment check in raw_eq) - #129667 (Rustc driver cleanup) - #129668 (Fix Pin::set bounds regression) - #129686 (coverage: Rename `CodeRegion` to `SourceRegion`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents ac77e88 + 4854fa7 commit 100fde5

File tree

145 files changed

+899
-701
lines changed

Some content is hidden

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

145 files changed

+899
-701
lines changed
 

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use rustc_middle::mir::coverage::{
2-
CodeRegion, ConditionInfo, CounterId, CovTerm, DecisionInfo, ExpressionId, MappingKind,
2+
ConditionInfo, CounterId, CovTerm, DecisionInfo, ExpressionId, MappingKind, SourceRegion,
33
};
44

55
/// Must match the layout of `LLVMRustCounterKind`.
@@ -236,9 +236,10 @@ impl CounterMappingRegion {
236236
pub(crate) fn from_mapping(
237237
mapping_kind: &MappingKind,
238238
local_file_id: u32,
239-
code_region: &CodeRegion,
239+
source_region: &SourceRegion,
240240
) -> Self {
241-
let &CodeRegion { file_name: _, start_line, start_col, end_line, end_col } = code_region;
241+
let &SourceRegion { file_name: _, start_line, start_col, end_line, end_col } =
242+
source_region;
242243
match *mapping_kind {
243244
MappingKind::Code(term) => Self::code_region(
244245
Counter::from_term(term),

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use rustc_data_structures::captures::Captures;
22
use rustc_data_structures::fx::FxIndexSet;
33
use rustc_index::bit_set::BitSet;
44
use rustc_middle::mir::coverage::{
5-
CodeRegion, CounterId, CovTerm, Expression, ExpressionId, FunctionCoverageInfo, Mapping,
6-
MappingKind, Op,
5+
CounterId, CovTerm, Expression, ExpressionId, FunctionCoverageInfo, Mapping, MappingKind, Op,
6+
SourceRegion,
77
};
88
use rustc_middle::ty::Instance;
99
use rustc_span::Symbol;
@@ -201,7 +201,7 @@ impl<'tcx> FunctionCoverage<'tcx> {
201201

202202
/// Returns an iterator over all filenames used by this function's mappings.
203203
pub(crate) fn all_file_names(&self) -> impl Iterator<Item = Symbol> + Captures<'_> {
204-
self.function_coverage_info.mappings.iter().map(|mapping| mapping.code_region.file_name)
204+
self.function_coverage_info.mappings.iter().map(|mapping| mapping.source_region.file_name)
205205
}
206206

207207
/// Convert this function's coverage expression data into a form that can be
@@ -230,12 +230,12 @@ impl<'tcx> FunctionCoverage<'tcx> {
230230
/// that will be used by `mapgen` when preparing for FFI.
231231
pub(crate) fn counter_regions(
232232
&self,
233-
) -> impl Iterator<Item = (MappingKind, &CodeRegion)> + ExactSizeIterator {
233+
) -> impl Iterator<Item = (MappingKind, &SourceRegion)> + ExactSizeIterator {
234234
self.function_coverage_info.mappings.iter().map(move |mapping| {
235-
let Mapping { kind, code_region } = mapping;
235+
let Mapping { kind, source_region } = mapping;
236236
let kind =
237237
kind.map_terms(|term| if self.is_zero_term(term) { CovTerm::Zero } else { term });
238-
(kind, code_region)
238+
(kind, source_region)
239239
})
240240
}
241241

0 commit comments

Comments
 (0)
Please sign in to comment.