@@ -703,44 +703,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
703
703
} )
704
704
}
705
705
706
- /// Creates a new `hir::GenericParam` for every new `Fresh` lifetime and
707
- /// universal `impl Trait` type parameter encountered while evaluating `f`.
708
- /// Definitions are created with the provided `parent_def_id`.
709
- fn lower_generics < T > (
710
- & mut self ,
711
- generics : & Generics ,
712
- parent_node_id : NodeId ,
713
- itctx : ImplTraitContext ,
714
- f : impl FnOnce ( & mut Self ) -> T ,
715
- ) -> ( & ' hir hir:: Generics < ' hir > , T ) {
716
- match itctx {
717
- ImplTraitContext :: Universal ( ..) => { }
718
- _ => {
719
- debug_assert ! ( self . impl_trait_defs. is_empty( ) ) ;
720
- debug_assert ! ( self . impl_trait_bounds. is_empty( ) ) ;
721
- }
722
- }
723
-
724
- let mut lowered_generics = self . lower_generics_mut ( generics, itctx) ;
725
- let res = f ( self ) ;
726
-
727
- let extra_lifetimes = self . resolver . take_extra_lifetime_params ( parent_node_id) ;
728
- let impl_trait_defs = std:: mem:: take ( & mut self . impl_trait_defs ) ;
729
- lowered_generics. params . extend (
730
- extra_lifetimes
731
- . into_iter ( )
732
- . filter_map ( |( ident, node_id, res) | {
733
- self . lifetime_res_to_generic_param ( ident, node_id, res)
734
- } )
735
- . chain ( impl_trait_defs. into_iter ( ) ) ,
736
- ) ;
737
- let impl_trait_bounds = std:: mem:: take ( & mut self . impl_trait_bounds ) ;
738
- lowered_generics. predicates . extend ( impl_trait_bounds. into_iter ( ) ) ;
739
-
740
- let lowered_generics = lowered_generics. into_generics ( self . arena ) ;
741
- ( lowered_generics, res)
742
- }
743
-
744
706
/// Setup lifetime capture for and impl-trait.
745
707
/// The captures will be added to `captures`.
746
708
fn while_capturing_lifetimes < T > (
0 commit comments