mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Make the Resolution variants tuple variants
This commit is contained in:
parent
d3df80dfe4
commit
d571d26955
7 changed files with 41 additions and 53 deletions
|
@ -90,9 +90,8 @@ impl ImplBlock {
|
|||
pub fn target_trait(&self, db: &impl HirDatabase) -> Option<Trait> {
|
||||
if let Some(TypeRef::Path(path)) = self.target_trait_ref() {
|
||||
let resolver = self.resolver(db);
|
||||
if let Some(Resolution::Def {
|
||||
def: ModuleDef::Trait(tr),
|
||||
}) = resolver.resolve_path(db, path).take_types()
|
||||
if let Some(Resolution::Def(ModuleDef::Trait(tr))) =
|
||||
resolver.resolve_path(db, path).take_types()
|
||||
{
|
||||
return Some(tr);
|
||||
}
|
||||
|
@ -106,7 +105,7 @@ impl ImplBlock {
|
|||
|
||||
pub fn resolver(&self, db: &impl HirDatabase) -> Resolver {
|
||||
let r = self.module().resolver(db);
|
||||
// FIXME: add generics
|
||||
// TODO: add generics
|
||||
let r = r.push_impl_block_scope(self.clone());
|
||||
r
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue