@@ -15,7 +15,6 @@ use crate::stable_mir::ty::{
15
15
} ;
16
16
use crate :: stable_mir:: { self , Context } ;
17
17
use rustc_hir as hir;
18
- use rustc_middle:: mir:: coverage:: CodeRegion ;
19
18
use rustc_middle:: mir:: interpret:: alloc_range;
20
19
use rustc_middle:: mir:: { self , ConstantKind } ;
21
20
use rustc_middle:: ty:: { self , Ty , TyCtxt , Variance } ;
@@ -192,10 +191,7 @@ impl<'tcx> Stable<'tcx> for mir::Statement<'tcx> {
192
191
variance : variance. stable ( tables) ,
193
192
}
194
193
}
195
- Coverage ( coverage) => stable_mir:: mir:: Statement :: Coverage ( stable_mir:: mir:: Coverage {
196
- kind : coverage. kind . stable ( tables) ,
197
- code_region : coverage. code_region . as_ref ( ) . map ( |reg| reg. stable ( tables) ) ,
198
- } ) ,
194
+ Coverage ( coverage) => stable_mir:: mir:: Statement :: Coverage ( opaque ( coverage) ) ,
199
195
Intrinsic ( intrinstic) => {
200
196
stable_mir:: mir:: Statement :: Intrinsic ( intrinstic. stable ( tables) )
201
197
}
@@ -496,30 +492,6 @@ impl<'tcx> Stable<'tcx> for mir::Place<'tcx> {
496
492
}
497
493
}
498
494
499
- impl < ' tcx > Stable < ' tcx > for mir:: coverage:: CoverageKind {
500
- type T = stable_mir:: mir:: CoverageKind ;
501
- fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
502
- use rustc_middle:: mir:: coverage:: CoverageKind ;
503
- match self {
504
- CoverageKind :: Counter { function_source_hash, id } => {
505
- stable_mir:: mir:: CoverageKind :: Counter {
506
- function_source_hash : * function_source_hash as usize ,
507
- id : opaque ( id) ,
508
- }
509
- }
510
- CoverageKind :: Expression { id, lhs, op, rhs } => {
511
- stable_mir:: mir:: CoverageKind :: Expression {
512
- id : opaque ( id) ,
513
- lhs : opaque ( lhs) ,
514
- op : op. stable ( tables) ,
515
- rhs : opaque ( rhs) ,
516
- }
517
- }
518
- CoverageKind :: Unreachable => stable_mir:: mir:: CoverageKind :: Unreachable ,
519
- }
520
- }
521
- }
522
-
523
495
impl < ' tcx > Stable < ' tcx > for mir:: UserTypeProjection {
524
496
type T = stable_mir:: mir:: UserTypeProjection ;
525
497
@@ -528,18 +500,6 @@ impl<'tcx> Stable<'tcx> for mir::UserTypeProjection {
528
500
}
529
501
}
530
502
531
- impl < ' tcx > Stable < ' tcx > for mir:: coverage:: Op {
532
- type T = stable_mir:: mir:: Op ;
533
-
534
- fn stable ( & self , _: & mut Tables < ' tcx > ) -> Self :: T {
535
- use rustc_middle:: mir:: coverage:: Op :: * ;
536
- match self {
537
- Subtract => stable_mir:: mir:: Op :: Subtract ,
538
- Add => stable_mir:: mir:: Op :: Add ,
539
- }
540
- }
541
- }
542
-
543
503
impl < ' tcx > Stable < ' tcx > for mir:: Local {
544
504
type T = stable_mir:: mir:: Local ;
545
505
fn stable ( & self , _: & mut Tables < ' tcx > ) -> Self :: T {
@@ -586,20 +546,6 @@ impl<'tcx> Stable<'tcx> for ty::UserTypeAnnotationIndex {
586
546
}
587
547
}
588
548
589
- impl < ' tcx > Stable < ' tcx > for CodeRegion {
590
- type T = stable_mir:: mir:: CodeRegion ;
591
-
592
- fn stable ( & self , _: & mut Tables < ' tcx > ) -> Self :: T {
593
- stable_mir:: mir:: CodeRegion {
594
- file_name : self . file_name . as_str ( ) . to_string ( ) ,
595
- start_line : self . start_line as usize ,
596
- start_col : self . start_col as usize ,
597
- end_line : self . end_line as usize ,
598
- end_col : self . end_col as usize ,
599
- }
600
- }
601
- }
602
-
603
549
impl < ' tcx > Stable < ' tcx > for mir:: UnwindAction {
604
550
type T = stable_mir:: mir:: UnwindAction ;
605
551
fn stable ( & self , _: & mut Tables < ' tcx > ) -> Self :: T {
0 commit comments