94
94
95
95
// Manuel, fixing rebase
96
96
use rustc_symbol_mangling:: symbol_name_for_instance_in_crate;
97
- // use crate::ty::ParamEnv ;
98
- use rustc_middle :: ty :: ParamEnv ;
97
+ use rustc_middle :: middle :: typetree :: { Kind , Type , TypeTree } ;
98
+ use rustc_target :: abi :: FieldsShape ;
99
99
100
100
use std:: cmp;
101
101
use std:: collections:: hash_map:: Entry ;
@@ -117,7 +117,7 @@ use rustc_middle::mir::mono::{
117
117
} ;
118
118
use rustc_middle:: query:: Providers ;
119
119
use rustc_middle:: ty:: print:: { characteristic_def_id_of_type, with_no_trimmed_paths} ;
120
- use rustc_middle:: ty:: { self , visit:: TypeVisitableExt , InstanceDef , TyCtxt } ;
120
+ use rustc_middle:: ty:: { self , visit:: TypeVisitableExt , InstanceDef , TyCtxt , ParamEnv , ParamEnvAnd , Adt , Ty } ;
121
121
use rustc_session:: config:: { DumpMonoStatsFormat , SwitchWithOptPath } ;
122
122
use rustc_session:: CodegenUnits ;
123
123
use rustc_span:: symbol:: Symbol ;
@@ -1249,9 +1249,9 @@ fn collect_and_partition_mono_items(tcx: TyCtxt<'_>, (): ()) -> (&DefIdSet, &[Au
1249
1249
1250
1250
( tcx. arena . alloc ( mono_items) , autodiff_items, codegen_units)
1251
1251
}
1252
- use rustc_middle:: ty:: { self , Adt , ParamEnvAnd , Ty } ;
1253
- use rustc_target:: abi:: FieldsShape ;
1254
- use std:: iter;
1252
+ // use rustc_middle::ty::{self, Adt, ParamEnvAnd, Ty};
1253
+ // use rustc_target::abi::FieldsShape;
1254
+ // use std::iter;
1255
1255
1256
1256
pub fn typetree_empty ( ) -> TypeTree {
1257
1257
TypeTree ( vec ! [ ] )
@@ -1369,7 +1369,7 @@ pub fn typetree_from_ty<'a>(ty: Ty<'a>, tcx: TyCtxt<'a>, depth: usize) -> TypeTr
1369
1369
let param_env_and = ParamEnvAnd { param_env : ParamEnv :: empty ( ) , value : sub_ty } ;
1370
1370
let size = tcx. layout_of ( param_env_and) . unwrap ( ) . size . bytes ( ) as usize ;
1371
1371
let tt = TypeTree (
1372
- iter:: repeat ( subtt)
1372
+ std :: iter:: repeat ( subtt)
1373
1373
. take ( * count as usize )
1374
1374
. enumerate ( )
1375
1375
. map ( |( idx, x) | x. 0 . into_iter ( ) . map ( move |x| x. add_offset ( ( idx * size) as isize ) ) )
0 commit comments