Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
| -rw-r--r-- | crates/hir/src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 14066dee5f..f157b11df5 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -4321,8 +4321,10 @@ impl Type { self.ty .strip_references() .as_adt() + .map(|(_, substs)| substs) + .or_else(|| self.ty.strip_references().as_tuple()) .into_iter() - .flat_map(|(_, substs)| substs.iter(Interner)) + .flat_map(|substs| substs.iter(Interner)) .filter_map(|arg| arg.ty(Interner).cloned()) .map(move |ty| self.derived(ty)) } |