mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
hir: resolve associated items in docs (excl. type aliases)
This commit is contained in:
parent
d987137b4e
commit
fe6f931ac2
3 changed files with 102 additions and 12 deletions
|
@ -4121,6 +4121,10 @@ impl Type {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn canonical(&self) -> Canonical<Ty> {
|
||||
hir_ty::replace_errors_with_variables(&self.ty)
|
||||
}
|
||||
|
||||
/// Returns types that this type dereferences to (including this type itself). The returned
|
||||
/// iterator won't yield the same type more than once even if the deref chain contains a cycle.
|
||||
pub fn autoderef(&self, db: &dyn HirDatabase) -> impl Iterator<Item = Type> + '_ {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue