We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4c4542 commit 68e8379Copy full SHA for 68e8379
crates/hir-def/src/generics.rs
@@ -307,7 +307,7 @@ impl GenericParams {
307
let param = ConstParamData {
308
name,
309
ty: Interned::new(ty),
310
- default: ConstRef::from_const_param(lower_ctx, const_param),
+ default: ConstRef::from_const_param(lower_ctx, &const_param),
311
};
312
let idx = self.type_or_consts.alloc(param.into());
313
add_param_attrs(idx.into(), ast::GenericParam::ConstParam(const_param));
crates/hir-def/src/hir/type_ref.rs
@@ -395,7 +395,7 @@ impl ConstRef {
395
396
pub(crate) fn from_const_param(
397
lower_ctx: &LowerCtx<'_>,
398
- param: ast::ConstParam,
+ param: &ast::ConstParam,
399
) -> Option<Self> {
400
let default = param.default_val();
401
match default {
0 commit comments