Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/hir-def/src/generics.rs2
-rw-r--r--crates/hir-def/src/hir/type_ref.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir-def/src/generics.rs b/crates/hir-def/src/generics.rs
index 7ee27d2670..1e2535a8a9 100644
--- a/crates/hir-def/src/generics.rs
+++ b/crates/hir-def/src/generics.rs
@@ -307,7 +307,7 @@ impl GenericParams {
let param = ConstParamData {
name,
ty: Interned::new(ty),
- default: ConstRef::from_const_param(lower_ctx, const_param),
+ default: ConstRef::from_const_param(lower_ctx, &const_param),
};
let idx = self.type_or_consts.alloc(param.into());
add_param_attrs(idx.into(), ast::GenericParam::ConstParam(const_param));
diff --git a/crates/hir-def/src/hir/type_ref.rs b/crates/hir-def/src/hir/type_ref.rs
index c518f1b75b..75adf21abd 100644
--- a/crates/hir-def/src/hir/type_ref.rs
+++ b/crates/hir-def/src/hir/type_ref.rs
@@ -395,7 +395,7 @@ impl ConstRef {
pub(crate) fn from_const_param(
lower_ctx: &LowerCtx<'_>,
- param: ast::ConstParam,
+ param: &ast::ConstParam,
) -> Option<Self> {
let default = param.default_val();
match default {