@@ -40,7 +40,7 @@ use self::outlives::env::OutlivesEnvironment;
40
40
use self :: region_constraints:: { GenericKind , RegionConstraintData , VarInfos , VerifyBound } ;
41
41
use self :: region_constraints:: { RegionConstraintCollector , RegionSnapshot } ;
42
42
use self :: type_variable:: { TypeVariableOrigin , TypeVariableOriginKind } ;
43
- use self :: unify_key:: { ToType , ConstVariableOrigin } ;
43
+ use self :: unify_key:: { ToType , ConstVariableOrigin , ConstVariableOriginKind } ;
44
44
45
45
pub mod at;
46
46
pub mod canonical;
@@ -1119,7 +1119,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
1119
1119
self . tcx . mk_ty_var ( ty_var_id) . into ( )
1120
1120
}
1121
1121
GenericParamDefKind :: Const { .. } => {
1122
- let origin = ConstVariableOrigin :: ConstParameterDefinition ( span, param. name ) ;
1122
+ let origin = ConstVariableOrigin {
1123
+ kind : ConstVariableOriginKind :: ConstParameterDefinition ( param. name ) ,
1124
+ span,
1125
+ } ;
1123
1126
let const_var_id =
1124
1127
self . const_unification_table
1125
1128
. borrow_mut ( )
@@ -1421,7 +1424,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
1421
1424
span,
1422
1425
} )
1423
1426
} ;
1424
- let fld_c = |_, ty| self . next_const_var ( ty, ConstVariableOrigin :: MiscVariable ( span) ) ;
1427
+ let fld_c = |_, ty| self . next_const_var ( ty, ConstVariableOrigin {
1428
+ kind : ConstVariableOriginKind :: MiscVariable ,
1429
+ span,
1430
+ } ) ;
1425
1431
self . tcx . replace_bound_vars ( value, fld_r, fld_t, fld_c)
1426
1432
}
1427
1433
0 commit comments