mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 15:47:31 +00:00
Use impl_trait_ns in Impl::trait_ref
This commit is contained in:
parent
e979349978
commit
766e6b58ad
1 changed files with 1 additions and 4 deletions
|
@ -4523,10 +4523,7 @@ impl Impl {
|
|||
}
|
||||
|
||||
pub fn trait_ref(self, db: &dyn HirDatabase) -> Option<TraitRef<'_>> {
|
||||
let interner = DbInterner::new_with(db, None, None);
|
||||
let substs = TyBuilder::placeholder_subst(db, self.id);
|
||||
let trait_ref =
|
||||
db.impl_trait(self.id)?.substitute(Interner, &substs).to_nextsolver(interner);
|
||||
let trait_ref = db.impl_trait_ns(self.id)?.instantiate_identity();
|
||||
let resolver = self.id.resolver(db);
|
||||
Some(TraitRef::new_with_resolver(db, &resolver, trait_ref))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue