@@ -10,7 +10,6 @@ use rustc_hir as hir;
10
10
use rustc_hir:: def:: { CtorKind , CtorOf , DefKind , Res } ;
11
11
use rustc_hir:: def_id:: DefId ;
12
12
use rustc_hir:: { Expr , FnDecl , LangItem , TyKind , Unsafety } ;
13
- use rustc_infer:: infer:: type_variable:: TypeVariableOrigin ;
14
13
use rustc_infer:: infer:: TyCtxtInferExt ;
15
14
use rustc_lint:: LateContext ;
16
15
use rustc_middle:: mir:: interpret:: Scalar ;
@@ -19,7 +18,7 @@ use rustc_middle::traits::EvaluationResult;
19
18
use rustc_middle:: ty:: layout:: ValidityRequirement ;
20
19
use rustc_middle:: ty:: {
21
20
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 ,
23
22
TypeSuperVisitable , TypeVisitable , TypeVisitableExt , TypeVisitor , UintTy , VariantDef , VariantDiscr ,
24
23
} ;
25
24
use rustc_span:: symbol:: Ident ;
@@ -276,11 +275,7 @@ pub fn implements_trait_with_env_from_iter<'tcx>(
276
275
. into_iter ( )
277
276
. map ( |arg| {
278
277
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 ( )
284
279
} )
285
280
} )
286
281
. collect :: < Vec < _ > > ( ) ;
@@ -961,7 +956,11 @@ pub struct AdtVariantInfo {
961
956
962
957
impl AdtVariantInfo {
963
958
/// 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 > {
965
964
let mut variants_size = adt
966
965
. variants ( )
967
966
. iter ( )
0 commit comments