mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 11:20:54 +00:00
Use impl_trait_ns in Impl::trait_ref
This commit is contained in:
parent
e979349978
commit
766e6b58ad
@ -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…
x
Reference in New Issue
Block a user