about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorAman Arora <me@aman-arora.com>2020-11-04 03:07:40 -0500
committerRoxane <roxane.fruytier@hotmail.com>2020-11-29 19:11:20 -0500
commit5da2bf197d301f83716a209cb28ea2b403c8a20c (patch)
tree161dc4649cbc2bf30349f8160ada1222fe7ccc20 /compiler
parent349b3b324dade7ca638091db93ba08bbc443c63d (diff)
downloadrust-5da2bf197d301f83716a209cb28ea2b403c8a20c.tar.gz
rust-5da2bf197d301f83716a209cb28ea2b403c8a20c.zip
Remove extra call to upvar_tys
Fixes #78720
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_trait_selection/src/opaque_types.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/compiler/rustc_trait_selection/src/opaque_types.rs b/compiler/rustc_trait_selection/src/opaque_types.rs
index ca547bf88b5..f5bc90e6f96 100644
--- a/compiler/rustc_trait_selection/src/opaque_types.rs
+++ b/compiler/rustc_trait_selection/src/opaque_types.rs
@@ -722,11 +722,6 @@ where
                 // Skip lifetime parameters of the enclosing item(s)
 
                 substs.as_closure().tupled_upvars_ty().visit_with(self);
-
-                for upvar_ty in substs.as_closure().upvar_tys() {
-                    upvar_ty.visit_with(self);
-                }
-
                 substs.as_closure().sig_as_fn_ptr_ty().visit_with(self);
             }
 
@@ -735,11 +730,6 @@ where
                 // Also skip the witness type, because that has no free regions.
 
                 substs.as_generator().tupled_upvars_ty().visit_with(self);
-
-                for upvar_ty in substs.as_generator().upvar_tys() {
-                    upvar_ty.visit_with(self);
-                }
-
                 substs.as_generator().return_ty().visit_with(self);
                 substs.as_generator().yield_ty().visit_with(self);
                 substs.as_generator().resume_ty().visit_with(self);