From 68e8379ec35f83ce22d3c57bad79e8a7bc7ea231 Mon Sep 17 00:00:00 2001 From: ponyii Date: Tue, 8 Aug 2023 22:16:28 +0400 Subject: [PATCH] fixed a merge-caused error --- crates/hir-def/src/generics.rs | 2 +- crates/hir-def/src/hir/type_ref.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/hir-def/src/generics.rs b/crates/hir-def/src/generics.rs index 7ee27d26709..1e2535a8a99 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 c518f1b75b3..75adf21abdc 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 { let default = param.default_val(); match default {