1
Fork 0

Use upvar_tys in more places, make it a list

This commit is contained in:
Michael Goulet 2023-07-25 23:31:21 +00:00
parent d12c6e947c
commit 99969d282b
17 changed files with 66 additions and 78 deletions

View file

@ -120,12 +120,16 @@ where
_ if component.is_copy_modulo_regions(tcx, self.param_env) => (),
ty::Closure(_, args) => {
queue_type(self, args.as_closure().tupled_upvars_ty());
for upvar in args.as_closure().upvar_tys() {
queue_type(self, upvar);
}
}
ty::Generator(def_id, args, _) => {
let args = args.as_generator();
queue_type(self, args.tupled_upvars_ty());
for upvar in args.upvar_tys() {
queue_type(self, upvar);
}
let witness = args.witness();
let interior_tys = match witness.kind() {