From a6e339e822bcba4d81f1ab3912ca9612be9b6a0a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 11 Jun 2019 17:36:52 +0300 Subject: use Source for impl block --- crates/ra_hir/src/generics.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src/generics.rs') diff --git a/crates/ra_hir/src/generics.rs b/crates/ra_hir/src/generics.rs index 08d711754..0b8bd5700 100644 --- a/crates/ra_hir/src/generics.rs +++ b/crates/ra_hir/src/generics.rs @@ -70,7 +70,7 @@ impl GenericParams { match def { GenericDef::Function(it) => generics.fill(&*it.source(db).ast, start), GenericDef::Struct(it) => generics.fill(&*it.source(db).ast, start), - GenericDef::Union(it) => generics.fill(&*it.source(db).1, start), + GenericDef::Union(it) => generics.fill(&*it.source(db).ast, start), GenericDef::Enum(it) => generics.fill(&*it.source(db).ast, start), GenericDef::Trait(it) => { // traits get the Self type as an implicit first type parameter @@ -82,7 +82,7 @@ impl GenericParams { generics.fill(&*it.source(db).ast, start + 1); } GenericDef::TypeAlias(it) => generics.fill(&*it.source(db).ast, start), - GenericDef::ImplBlock(it) => generics.fill(&*it.source(db).1, start), + GenericDef::ImplBlock(it) => generics.fill(&*it.source(db).ast, start), } Arc::new(generics) -- cgit v1.2.3