@@ -14,7 +14,6 @@ use crate::stable_mir::ty::{
14
14
} ;
15
15
use crate :: stable_mir:: { self , Context } ;
16
16
use rustc_hir as hir;
17
- use rustc_middle:: mir:: coverage:: CodeRegion ;
18
17
use rustc_middle:: mir:: interpret:: alloc_range;
19
18
use rustc_middle:: mir:: { self , ConstantKind } ;
20
19
use rustc_middle:: ty:: { self , Ty , TyCtxt , Variance } ;
@@ -168,10 +167,7 @@ impl<'tcx> Stable<'tcx> for mir::Statement<'tcx> {
168
167
variance : variance. stable ( tables) ,
169
168
}
170
169
}
171
- Coverage ( coverage) => stable_mir:: mir:: Statement :: Coverage ( stable_mir:: mir:: Coverage {
172
- kind : coverage. kind . stable ( tables) ,
173
- code_region : coverage. code_region . as_ref ( ) . map ( |reg| reg. stable ( tables) ) ,
174
- } ) ,
170
+ Coverage ( coverage) => stable_mir:: mir:: Statement :: Coverage ( opaque ( coverage) ) ,
175
171
Intrinsic ( intrinstic) => {
176
172
stable_mir:: mir:: Statement :: Intrinsic ( intrinstic. stable ( tables) )
177
173
}
@@ -472,30 +468,6 @@ impl<'tcx> Stable<'tcx> for mir::Place<'tcx> {
472
468
}
473
469
}
474
470
475
- impl < ' tcx > Stable < ' tcx > for mir:: coverage:: CoverageKind {
476
- type T = stable_mir:: mir:: CoverageKind ;
477
- fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
478
- use rustc_middle:: mir:: coverage:: CoverageKind ;
479
- match self {
480
- CoverageKind :: Counter { function_source_hash, id } => {
481
- stable_mir:: mir:: CoverageKind :: Counter {
482
- function_source_hash : * function_source_hash as usize ,
483
- id : opaque ( id) ,
484
- }
485
- }
486
- CoverageKind :: Expression { id, lhs, op, rhs } => {
487
- stable_mir:: mir:: CoverageKind :: Expression {
488
- id : opaque ( id) ,
489
- lhs : opaque ( lhs) ,
490
- op : op. stable ( tables) ,
491
- rhs : opaque ( rhs) ,
492
- }
493
- }
494
- CoverageKind :: Unreachable => stable_mir:: mir:: CoverageKind :: Unreachable ,
495
- }
496
- }
497
- }
498
-
499
471
impl < ' tcx > Stable < ' tcx > for mir:: UserTypeProjection {
500
472
type T = stable_mir:: mir:: UserTypeProjection ;
501
473
@@ -504,18 +476,6 @@ impl<'tcx> Stable<'tcx> for mir::UserTypeProjection {
504
476
}
505
477
}
506
478
507
- impl < ' tcx > Stable < ' tcx > for mir:: coverage:: Op {
508
- type T = stable_mir:: mir:: Op ;
509
-
510
- fn stable ( & self , _: & mut Tables < ' tcx > ) -> Self :: T {
511
- use rustc_middle:: mir:: coverage:: Op :: * ;
512
- match self {
513
- Subtract => stable_mir:: mir:: Op :: Subtract ,
514
- Add => stable_mir:: mir:: Op :: Add ,
515
- }
516
- }
517
- }
518
-
519
479
impl < ' tcx > Stable < ' tcx > for mir:: Local {
520
480
type T = stable_mir:: mir:: Local ;
521
481
fn stable ( & self , _: & mut Tables < ' tcx > ) -> Self :: T {
@@ -562,20 +522,6 @@ impl<'tcx> Stable<'tcx> for ty::UserTypeAnnotationIndex {
562
522
}
563
523
}
564
524
565
- impl < ' tcx > Stable < ' tcx > for CodeRegion {
566
- type T = stable_mir:: mir:: CodeRegion ;
567
-
568
- fn stable ( & self , _: & mut Tables < ' tcx > ) -> Self :: T {
569
- stable_mir:: mir:: CodeRegion {
570
- file_name : self . file_name . as_str ( ) . to_string ( ) ,
571
- start_line : self . start_line as usize ,
572
- start_col : self . start_col as usize ,
573
- end_line : self . end_line as usize ,
574
- end_col : self . end_col as usize ,
575
- }
576
- }
577
- }
578
-
579
525
impl < ' tcx > Stable < ' tcx > for mir:: UnwindAction {
580
526
type T = stable_mir:: mir:: UnwindAction ;
581
527
fn stable ( & self , _: & mut Tables < ' tcx > ) -> Self :: T {
0 commit comments