@@ -1768,7 +1768,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1768
1768
1769
1769
// Contains the new lifetime definitions created for the TAIT (if any) generated for the
1770
1770
// return type.
1771
- let mut captures = Vec :: new ( ) ;
1771
+ let mut collected_lifetimes = Vec :: new ( ) ;
1772
1772
let mut new_remapping = FxHashMap :: default ( ) ;
1773
1773
1774
1774
let extra_lifetime_params = self . resolver . take_extra_lifetime_params ( opaque_ty_node_id) ;
@@ -1804,10 +1804,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1804
1804
} ;
1805
1805
1806
1806
let lifetime = Lifetime { id : outer_node_id, ident } ;
1807
- captures . push ( ( inner_node_id, lifetime, Some ( inner_res) ) ) ;
1807
+ collected_lifetimes . push ( ( inner_node_id, lifetime, Some ( inner_res) ) ) ;
1808
1808
}
1809
1809
1810
- debug ! ( ?captures ) ;
1810
+ debug ! ( ?collected_lifetimes ) ;
1811
1811
1812
1812
// We only want to capture the lifetimes that appear in the bounds. So visit the bounds to
1813
1813
// find out exactly which ones those are.
@@ -1820,7 +1820,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1820
1820
// If this opaque type is only capturing a subset of the lifetimes (those that appear
1821
1821
// in bounds), then create the new lifetime parameters required and create a mapping
1822
1822
// from the old `'a` (on the function) to the new `'a` (on the opaque type).
1823
- captures . extend (
1823
+ collected_lifetimes . extend (
1824
1824
this. create_lifetime_defs (
1825
1825
opaque_ty_def_id,
1826
1826
& lifetimes_to_remap,
@@ -1829,7 +1829,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1829
1829
. into_iter ( )
1830
1830
. map ( |( new_node_id, lifetime) | ( new_node_id, lifetime, None ) ) ,
1831
1831
) ;
1832
- debug ! ( ?captures ) ;
1832
+ debug ! ( ?collected_lifetimes ) ;
1833
1833
debug ! ( ?new_remapping) ;
1834
1834
1835
1835
// Install the remapping from old to new (if any):
@@ -1845,7 +1845,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1845
1845
let future_bound =
1846
1846
this. lower_async_fn_output_type_to_future_bound ( output, fn_def_id, span) ;
1847
1847
1848
- let generic_params = this. arena . alloc_from_iter ( captures . iter ( ) . map (
1848
+ let generic_params = this. arena . alloc_from_iter ( collected_lifetimes . iter ( ) . map (
1849
1849
|& ( new_node_id, lifetime, _) | {
1850
1850
let hir_id = this. lower_node_id ( new_node_id) ;
1851
1851
debug_assert_ne ! ( this. opt_local_def_id( new_node_id) , None ) ;
@@ -1903,8 +1903,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1903
1903
//
1904
1904
// For the "output" lifetime parameters, we just want to
1905
1905
// generate `'_`.
1906
- let generic_args =
1907
- self . arena . alloc_from_iter ( captures . into_iter ( ) . map ( |( _, lifetime, res) | {
1906
+ let generic_args = self . arena . alloc_from_iter ( collected_lifetimes . into_iter ( ) . map (
1907
+ |( _, lifetime, res) | {
1908
1908
let id = self . next_node_id ( ) ;
1909
1909
let span = lifetime. ident . span ;
1910
1910
@@ -1919,7 +1919,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1919
1919
) ;
1920
1920
let l = self . new_named_lifetime_with_res ( id, span, ident, res) ;
1921
1921
hir:: GenericArg :: Lifetime ( l)
1922
- } ) ) ;
1922
+ } ,
1923
+ ) ) ;
1923
1924
1924
1925
// Create the `Foo<...>` reference itself. Note that the `type
1925
1926
// Foo = impl Trait` is, internally, created as a child of the
0 commit comments