completions: speed up completions by filtering non-applicable traits

This commit is contained in:
David Barsky 2024-02-13 13:25:03 -05:00
parent 9f0495761a
commit c246a93046
6 changed files with 243 additions and 4 deletions

View file

@ -4239,6 +4239,10 @@ impl Type {
}
}
pub fn fingerprint_for_trait_impl(&self) -> Option<TyFingerprint> {
TyFingerprint::for_trait_impl(&self.ty)
}
pub(crate) fn canonical(&self) -> Canonical<Ty> {
hir_ty::replace_errors_with_variables(&self.ty)
}