File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1612,12 +1612,12 @@ pub(crate) fn generic_defaults_query(
1612
1612
let unknown = unknown_const_as_generic (
1613
1613
db. const_param_ty ( ConstParamId :: from_unchecked ( id) ) ,
1614
1614
) ;
1615
- let val = p. default . as_ref ( ) . map_or ( unknown, |c| {
1615
+ let mut val = p. default . as_ref ( ) . map_or ( unknown, |c| {
1616
1616
let c = ctx. lower_const ( c, ctx. lower_ty ( & p. ty ) ) ;
1617
1617
chalk_ir:: GenericArg :: new ( Interner , GenericArgData :: Const ( c) )
1618
1618
} ) ;
1619
- // FIXME: check if complex default values refer to
1620
- // previous parameters they should not.
1619
+ // Each default can only refer to previous parameters, see above.
1620
+ val = fallback_bound_vars ( val , idx , parent_start_idx ) ;
1621
1621
return make_binders ( db, & generic_params, val) ;
1622
1622
}
1623
1623
} ;
You can’t perform that action at this time.
0 commit comments