-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Associated type basics & Deref support #1408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
6f946f9
49489dc
9c5e7dd
ca5ed23
3e78a6e
94a6aff
30647cd
96c2b9c
ad3673d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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<FnSignature>; | ||
|
||
#[salsa::invoke(crate::type_alias::type_alias_ref_query)] | ||
fn type_alias_ref(&self, typ: TypeAlias) -> Arc<TypeRef>; | ||
#[salsa::invoke(crate::type_alias::type_alias_data_query)] | ||
fn type_alias_data(&self, typ: TypeAlias) -> Arc<TypeAliasData>; | ||
|
||
#[salsa::invoke(crate::ConstSignature::const_signature_query)] | ||
fn const_signature(&self, konst: Const) -> Arc<ConstSignature>; | ||
|
@@ -185,6 +184,13 @@ pub trait HirDatabase: DefDatabase + AstDatabase { | |
krate: Crate, | ||
goal: crate::ty::Canonical<crate::ty::TraitRef>, | ||
) -> Option<crate::ty::traits::Solution>; | ||
|
||
#[salsa::invoke(crate::ty::traits::normalize)] | ||
flodiebold marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fn normalize( | ||
&self, | ||
krate: Crate, | ||
goal: crate::ty::Canonical<crate::ty::traits::ProjectionPredicate>, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm. I agree for |
||
) -> Option<crate::ty::traits::Solution>; | ||
} | ||
|
||
#[test] | ||
|
Uh oh!
There was an error while loading. Please reload this page.