about summary refs log tree commit diff
diff options
context:
space:
mode:
authorponyii <ponyii@protonmail.com>2023-08-08 22:16:28 +0400
committerponyii <ponyii@protonmail.com>2023-08-08 22:16:28 +0400
commit68e8379ec35f83ce22d3c57bad79e8a7bc7ea231 (patch)
treeafee6261799aa95102ee9b40ae9f0b2a01f10ebc
parente4c45427dc398f7fc8f984d2d1b454f36d718fd9 (diff)
downloadrust-68e8379ec35f83ce22d3c57bad79e8a7bc7ea231.tar.gz
rust-68e8379ec35f83ce22d3c57bad79e8a7bc7ea231.zip
fixed a merge-caused error
-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 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<Self> {
         let default = param.default_val();
         match default {