Rollup merge of #114079 - compiler-errors:closure-upvars, r=oli-obk
Use `upvar_tys` in more places, make it return a list Just a cleanup that fell out of a PR that I was gonna write, but that PR kinda got stuck.
This commit is contained in:
commit
46f6b05eb7
17 changed files with 66 additions and 78 deletions
|
@ -448,7 +448,9 @@ where
|
|||
ty::Closure(_, ref args) => {
|
||||
// Skip lifetime parameters of the enclosing item(s)
|
||||
|
||||
args.as_closure().tupled_upvars_ty().visit_with(self);
|
||||
for upvar in args.as_closure().upvar_tys() {
|
||||
upvar.visit_with(self);
|
||||
}
|
||||
args.as_closure().sig_as_fn_ptr_ty().visit_with(self);
|
||||
}
|
||||
|
||||
|
@ -456,7 +458,9 @@ where
|
|||
// Skip lifetime parameters of the enclosing item(s)
|
||||
// Also skip the witness type, because that has no free regions.
|
||||
|
||||
args.as_generator().tupled_upvars_ty().visit_with(self);
|
||||
for upvar in args.as_generator().upvar_tys() {
|
||||
upvar.visit_with(self);
|
||||
}
|
||||
args.as_generator().return_ty().visit_with(self);
|
||||
args.as_generator().yield_ty().visit_with(self);
|
||||
args.as_generator().resume_ty().visit_with(self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue