@@ -10,7 +10,6 @@ use rustc_hir as hir;
1010use rustc_hir:: def:: { CtorKind , CtorOf , DefKind , Res } ;
1111use rustc_hir:: def_id:: DefId ;
1212use rustc_hir:: { Expr , FnDecl , LangItem , TyKind , Unsafety } ;
13- use rustc_infer:: infer:: type_variable:: TypeVariableOrigin ;
1413use rustc_infer:: infer:: TyCtxtInferExt ;
1514use rustc_lint:: LateContext ;
1615use rustc_middle:: mir:: interpret:: Scalar ;
@@ -19,7 +18,7 @@ use rustc_middle::traits::EvaluationResult;
1918use rustc_middle:: ty:: layout:: ValidityRequirement ;
2019use rustc_middle:: ty:: {
2120 self , AdtDef , AliasTy , AssocKind , Binder , BoundRegion , FnSig , GenericArg , GenericArgKind , GenericArgsRef ,
22- GenericParamDefKind , IntTy , List , ParamEnv , Region , RegionKind , ToPredicate , TraitRef , Ty , TyCtxt ,
21+ GenericParamDefKind , IntTy , ParamEnv , Region , RegionKind , ToPredicate , TraitRef , Ty , TyCtxt ,
2322 TypeSuperVisitable , TypeVisitable , TypeVisitableExt , TypeVisitor , UintTy , VariantDef , VariantDiscr ,
2423} ;
2524use rustc_span:: symbol:: Ident ;
@@ -276,11 +275,7 @@ pub fn implements_trait_with_env_from_iter<'tcx>(
276275 . into_iter ( )
277276 . map ( |arg| {
278277 arg. into ( ) . unwrap_or_else ( || {
279- let orig = TypeVariableOrigin {
280- span : DUMMY_SP ,
281- param_def_id : None ,
282- } ;
283- infcx. next_ty_var ( orig) . into ( )
278+ infcx. next_ty_var ( DUMMY_SP ) . into ( )
284279 } )
285280 } )
286281 . collect :: < Vec < _ > > ( ) ;
@@ -961,7 +956,11 @@ pub struct AdtVariantInfo {
961956
962957impl AdtVariantInfo {
963958 /// Returns ADT variants ordered by size
964- pub fn new < ' tcx > ( cx : & LateContext < ' tcx > , adt : AdtDef < ' tcx > , subst : & ' tcx List < GenericArg < ' tcx > > ) -> Vec < Self > {
959+ pub fn new < ' tcx > (
960+ cx : & LateContext < ' tcx > ,
961+ adt : AdtDef < ' tcx > ,
962+ subst : GenericArgsRef < ' tcx >
963+ ) -> Vec < Self > {
965964 let mut variants_size = adt
966965 . variants ( )
967966 . iter ( )
0 commit comments