@@ -45,7 +45,7 @@ use rustc_ast::{self as ast, *};
45
45
use rustc_ast_pretty:: pprust;
46
46
use rustc_data_structures:: captures:: Captures ;
47
47
use rustc_data_structures:: fingerprint:: Fingerprint ;
48
- use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
48
+ use rustc_data_structures:: fx:: FxHashMap ;
49
49
use rustc_data_structures:: sorted_map:: SortedMap ;
50
50
use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
51
51
use rustc_data_structures:: sync:: Lrc ;
@@ -146,8 +146,6 @@ struct LifetimeCaptureContext {
146
146
LifetimeRes , // original resolution
147
147
) ,
148
148
> ,
149
- /// Traversed binders. The ids in this set should *not* be rebound.
150
- binders_to_ignore : FxHashSet < NodeId > ,
151
149
}
152
150
153
151
trait ResolverAstLoweringExt {
@@ -768,14 +766,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
768
766
let generic_params = self . arena . alloc_from_iter ( generic_params) ;
769
767
debug ! ( ?generic_params) ;
770
768
771
- if let Some ( ctxt) = & mut self . captured_lifetimes {
772
- ctxt. binders_to_ignore . insert ( binder) ;
773
- }
774
- let ret = f ( self , generic_params) ;
775
- if let Some ( ctxt) = & mut self . captured_lifetimes {
776
- ctxt. binders_to_ignore . remove ( & binder) ;
777
- }
778
- ret
769
+ f ( self , generic_params)
779
770
}
780
771
781
772
fn with_dyn_type_scope < T > ( & mut self , in_scope : bool , f : impl FnOnce ( & mut Self ) -> T ) -> T {
@@ -1346,7 +1337,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1346
1337
& mut lctx. captured_lifetimes ,
1347
1338
Some ( LifetimeCaptureContext {
1348
1339
captures : std:: mem:: take ( & mut collected_lifetimes) ,
1349
- binders_to_ignore : Default :: default ( ) ,
1350
1340
} ) ,
1351
1341
) ;
1352
1342
@@ -1735,10 +1725,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1735
1725
self . with_hir_id_owner ( opaque_ty_node_id, |this| {
1736
1726
let lifetime_stash = std:: mem:: replace (
1737
1727
& mut this. captured_lifetimes ,
1738
- Some ( LifetimeCaptureContext {
1739
- captures : std:: mem:: take ( & mut captures) ,
1740
- binders_to_ignore : Default :: default ( ) ,
1741
- } ) ,
1728
+ Some ( LifetimeCaptureContext { captures : std:: mem:: take ( & mut captures) } ) ,
1742
1729
) ;
1743
1730
1744
1731
let lifetimes_in_bounds =
0 commit comments