@@ -25,7 +25,8 @@ use std::fmt::Display;
25
25
/// - Total number of MIR instructions.
26
26
pub fn print_stats < ' tcx > ( tcx : TyCtxt < ' tcx > , items : & [ InternalMonoItem < ' tcx > ] ) {
27
27
rustc_internal:: run ( tcx, || {
28
- let item_types = items. iter ( ) . collect :: < Counter > ( ) ;
28
+ let item_types: Vec < MonoItem > = items. iter ( ) . map ( rustc_internal:: stable) . collect ( ) ;
29
+ let item_types = item_types. iter ( ) . collect :: < Counter > ( ) ;
29
30
let visitor = items
30
31
. iter ( )
31
32
. filter_map ( |& mono| {
@@ -120,12 +121,12 @@ impl<T: Into<Key>> FromIterator<T> for Counter {
120
121
#[ derive( Debug , Eq , Hash , PartialEq ) ]
121
122
struct Key ( pub & ' static str ) ;
122
123
123
- impl < ' tcx > From < & InternalMonoItem < ' tcx > > for Key {
124
- fn from ( value : & InternalMonoItem ) -> Self {
124
+ impl From < & MonoItem > for Key {
125
+ fn from ( value : & stable_mir :: mir :: mono :: MonoItem ) -> Self {
125
126
match value {
126
- InternalMonoItem :: Fn ( _) => Key ( "function" ) ,
127
- InternalMonoItem :: GlobalAsm ( _) => Key ( "global assembly" ) ,
128
- InternalMonoItem :: Static ( _) => Key ( "static item" ) ,
127
+ MonoItem :: Fn ( _) => Key ( "function" ) ,
128
+ MonoItem :: GlobalAsm ( _) => Key ( "global assembly" ) ,
129
+ MonoItem :: Static ( _) => Key ( "static item" ) ,
129
130
}
130
131
}
131
132
}
0 commit comments