From 49489dc20cc9f340d43acb467677b9bc59495ed2 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 12 May 2019 17:53:44 +0200 Subject: Add basic infrastructure for assoc type projection --- crates/ra_hir/src/db.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir/src/db.rs') diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index d2d6f95b7..651f0d4ca 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs @@ -16,9 +16,8 @@ use crate::{ adt::{StructData, EnumData}, impl_block::{ModuleImplBlocks, ImplSourceMap, ImplBlock}, generics::{GenericParams, GenericDef}, - type_ref::TypeRef, traits::TraitData, - lang_item::{LangItems, LangItemTarget}, + lang_item::{LangItems, LangItemTarget}, type_alias::TypeAliasData, }; // This database has access to source code, so queries here are not really @@ -113,8 +112,8 @@ pub trait DefDatabase: SourceDatabase { #[salsa::invoke(crate::FnSignature::fn_signature_query)] fn fn_signature(&self, func: Function) -> Arc; - #[salsa::invoke(crate::type_alias::type_alias_ref_query)] - fn type_alias_ref(&self, typ: TypeAlias) -> Arc; + #[salsa::invoke(crate::type_alias::type_alias_data_query)] + fn type_alias_data(&self, typ: TypeAlias) -> Arc; #[salsa::invoke(crate::ConstSignature::const_signature_query)] fn const_signature(&self, konst: Const) -> Arc; @@ -185,6 +184,13 @@ pub trait HirDatabase: DefDatabase + AstDatabase { krate: Crate, goal: crate::ty::Canonical, ) -> Option; + + #[salsa::invoke(crate::ty::traits::normalize)] + fn normalize( + &self, + krate: Crate, + goal: crate::ty::Canonical, + ) -> Option; } #[test] -- cgit v1.2.3 From 96c2b9c41d85a8bd781e2b734cac1224eb7c4694 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 16 Jun 2019 12:04:08 +0200 Subject: Simplifications / cleanup from review --- crates/ra_hir/src/db.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src/db.rs') diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index 651f0d4ca..c4dd54596 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs @@ -185,11 +185,11 @@ pub trait HirDatabase: DefDatabase + AstDatabase { goal: crate::ty::Canonical, ) -> Option; - #[salsa::invoke(crate::ty::traits::normalize)] + #[salsa::invoke(crate::ty::traits::normalize_query)] fn normalize( &self, krate: Crate, - goal: crate::ty::Canonical, + goal: crate::ty::Canonical, ) -> Option; } -- cgit v1.2.3