From bed12833cc4ce7c6b4085ba8dc47fc167c83f8ea Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Tue, 19 Jan 2021 20:01:49 +0100 Subject: Show const params in completions --- crates/hir/src/code_model.rs | 2 +- crates/hir/src/semantics.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/hir') diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index 2950f08b8..6f48322db 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs @@ -2045,7 +2045,7 @@ impl Callable { pub enum ScopeDef { ModuleDef(ModuleDef), MacroDef(MacroDef), - GenericParam(TypeParam), + GenericParam(GenericParam), ImplSelfType(Impl), AdtSelfType(Adt), Local(Local), diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs index ab213e04c..0a30b4f5b 100644 --- a/crates/hir/src/semantics.rs +++ b/crates/hir/src/semantics.rs @@ -814,7 +814,7 @@ impl<'a> SemanticsScope<'a> { } resolver::ScopeDef::ImplSelfType(it) => ScopeDef::ImplSelfType(it.into()), resolver::ScopeDef::AdtSelfType(it) => ScopeDef::AdtSelfType(it.into()), - resolver::ScopeDef::GenericParam(id) => ScopeDef::GenericParam(TypeParam { id }), + resolver::ScopeDef::GenericParam(id) => ScopeDef::GenericParam(id.into()), resolver::ScopeDef::Local(pat_id) => { let parent = resolver.body_owner().unwrap().into(); ScopeDef::Local(Local { parent, pat_id }) -- cgit v1.2.3