@@ -40,7 +40,7 @@ use self::outlives::env::OutlivesEnvironment;
4040use self :: region_constraints:: { GenericKind , RegionConstraintData , VarInfos , VerifyBound } ;
4141use self :: region_constraints:: { RegionConstraintCollector , RegionSnapshot } ;
4242use self :: type_variable:: { TypeVariableOrigin , TypeVariableOriginKind } ;
43- use self :: unify_key:: { ToType , ConstVariableOrigin } ;
43+ use self :: unify_key:: { ToType , ConstVariableOrigin , ConstVariableOriginKind } ;
4444
4545pub mod at;
4646pub mod canonical;
@@ -1119,7 +1119,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
11191119 self . tcx . mk_ty_var ( ty_var_id) . into ( )
11201120 }
11211121 GenericParamDefKind :: Const { .. } => {
1122- let origin = ConstVariableOrigin :: ConstParameterDefinition ( span, param. name ) ;
1122+ let origin = ConstVariableOrigin {
1123+ kind : ConstVariableOriginKind :: ConstParameterDefinition ( param. name ) ,
1124+ span,
1125+ } ;
11231126 let const_var_id =
11241127 self . const_unification_table
11251128 . borrow_mut ( )
@@ -1421,7 +1424,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
14211424 span,
14221425 } )
14231426 } ;
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+ } ) ;
14251431 self . tcx . replace_bound_vars ( value, fld_r, fld_t, fld_c)
14261432 }
14271433
0 commit comments