mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Add make_tuple
tactic
This commit is contained in:
parent
8bd30e9b3f
commit
be6f8e2648
4 changed files with 82 additions and 1 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue