Skip to content

Commit c7f7416

Browse files
committed
a minor patch
1 parent 6b162e2 commit c7f7416

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/hir-ty/src/lower.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,12 +1612,12 @@ pub(crate) fn generic_defaults_query(
16121612
let unknown = unknown_const_as_generic(
16131613
db.const_param_ty(ConstParamId::from_unchecked(id)),
16141614
);
1615-
let val = p.default.as_ref().map_or(unknown, |c| {
1615+
let mut val = p.default.as_ref().map_or(unknown, |c| {
16161616
let c = ctx.lower_const(c, ctx.lower_ty(&p.ty));
16171617
chalk_ir::GenericArg::new(Interner, GenericArgData::Const(c))
16181618
});
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);
16211621
return make_binders(db, &generic_params, val);
16221622
}
16231623
};

0 commit comments

Comments
 (0)