about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/mir/coverage.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-12-19 22:38:49 +0000
committerbors <bors@rust-lang.org>2024-12-19 22:38:49 +0000
commit8700ba1c2cbafd99ac6bd13a3dad61dd2f2912fb (patch)
tree94b178d6564e5d6dfe7c6cd10b71a4d58abd0182 /compiler/rustc_middle/src/mir/coverage.rs
parent9e136a30a965bf4e63f03095c57df7257bf96fd6 (diff)
parent4f053b18f53c019f36f79f429bbc01ec5c53e8dc (diff)
downloadrust-8700ba1c2cbafd99ac6bd13a3dad61dd2f2912fb.tar.gz
rust-8700ba1c2cbafd99ac6bd13a3dad61dd2f2912fb.zip
Auto merge of #134516 - matthiaskrgr:rollup-aqwxii0, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #134463 (compiletest: don't register predefined `MSVC`/`NONMSVC` FileCheck prefixes)
 - #134487 (Add reference annotations for the `coverage` attribute)
 - #134497 (coverage: Store coverage source regions as `Span` until codegen (take 2))
 - #134502 (Update std libc version to 0.2.169)
 - #134506 (Remove a duplicated check that doesn't do anything anymore.)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_middle/src/mir/coverage.rs')
-rw-r--r--compiler/rustc_middle/src/mir/coverage.rs18
1 files changed, 1 insertions, 17 deletions
diff --git a/compiler/rustc_middle/src/mir/coverage.rs b/compiler/rustc_middle/src/mir/coverage.rs
index 962176290df..29f26180c97 100644
--- a/compiler/rustc_middle/src/mir/coverage.rs
+++ b/compiler/rustc_middle/src/mir/coverage.rs
@@ -154,22 +154,6 @@ impl Debug for CoverageKind {
     }
 }
 
-#[derive(Clone, TyEncodable, TyDecodable, Hash, HashStable, PartialEq, Eq, PartialOrd, Ord)]
-#[derive(TypeFoldable, TypeVisitable)]
-pub struct SourceRegion {
-    pub start_line: u32,
-    pub start_col: u32,
-    pub end_line: u32,
-    pub end_col: u32,
-}
-
-impl Debug for SourceRegion {
-    fn fmt(&self, fmt: &mut Formatter<'_>) -> fmt::Result {
-        let &Self { start_line, start_col, end_line, end_col } = self;
-        write!(fmt, "{start_line}:{start_col} - {end_line}:{end_col}")
-    }
-}
-
 #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, HashStable)]
 #[derive(TyEncodable, TyDecodable, TypeFoldable, TypeVisitable)]
 pub enum Op {
@@ -231,7 +215,7 @@ impl MappingKind {
 #[derive(TyEncodable, TyDecodable, Hash, HashStable, TypeFoldable, TypeVisitable)]
 pub struct Mapping {
     pub kind: MappingKind,
-    pub source_region: SourceRegion,
+    pub span: Span,
 }
 
 /// Stores per-function coverage information attached to a `mir::Body`,