Skip to content

Commit d3492ca

Browse files
Use real opaque type instead of just saying impl Trait
1 parent daaae25 commit d3492ca

27 files changed

+52
-50
lines changed

compiler/rustc_borrowck/src/diagnostics/region_errors.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ pub(crate) enum RegionErrorKind<'tcx> {
7878
span: Span,
7979
/// The hidden type.
8080
hidden_ty: Ty<'tcx>,
81+
/// The opaque type.
82+
key: ty::OpaqueTypeKey<'tcx>,
8183
/// The unexpected region.
8284
member_region: ty::Region<'tcx>,
8385
},
@@ -205,14 +207,16 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
205207
}
206208
}
207209

208-
RegionErrorKind::UnexpectedHiddenRegion { span, hidden_ty, member_region } => {
210+
RegionErrorKind::UnexpectedHiddenRegion { span, hidden_ty, key, member_region } => {
209211
let named_ty = self.regioncx.name_regions(self.infcx.tcx, hidden_ty);
212+
let named_key = self.regioncx.name_regions(self.infcx.tcx, key);
210213
let named_region = self.regioncx.name_regions(self.infcx.tcx, member_region);
211214
self.buffer_error(unexpected_hidden_region_diagnostic(
212215
self.infcx.tcx,
213216
span,
214217
named_ty,
215218
named_region,
219+
named_key,
216220
));
217221
}
218222

compiler/rustc_borrowck/src/member_constraints.rs

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ pub(crate) struct NllMemberConstraint<'tcx> {
3838
/// The hidden type in which `R0` appears. (Used in error reporting.)
3939
pub(crate) hidden_ty: Ty<'tcx>,
4040

41+
pub(crate) key: ty::OpaqueTypeKey<'tcx>,
42+
4143
/// The region `R0`.
4244
pub(crate) member_region_vid: ty::RegionVid,
4345

@@ -90,6 +92,7 @@ impl<'tcx> MemberConstraintSet<'tcx, ty::RegionVid> {
9092
member_region_vid,
9193
definition_span: m_c.definition_span,
9294
hidden_ty: m_c.hidden_ty,
95+
key: m_c.key,
9396
start_index,
9497
end_index,
9598
});

compiler/rustc_borrowck/src/region_infer/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1763,6 +1763,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
17631763
errors_buffer.push(RegionErrorKind::UnexpectedHiddenRegion {
17641764
span: m_c.definition_span,
17651765
hidden_ty: m_c.hidden_ty,
1766+
key: m_c.key,
17661767
member_region,
17671768
});
17681769
}

compiler/rustc_borrowck/src/region_infer/opaque_types.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
246246
// after producing an error for each of them.
247247
let definition_ty = instantiated_ty.ty.fold_with(&mut ReverseMapper::new(
248248
self.tcx,
249-
def_id,
249+
opaque_type_key,
250250
map,
251251
instantiated_ty.ty,
252252
instantiated_ty.span,
@@ -429,7 +429,7 @@ fn check_opaque_type_parameter_valid(
429429
struct ReverseMapper<'tcx> {
430430
tcx: TyCtxt<'tcx>,
431431

432-
opaque_type_def_id: LocalDefId,
432+
key: ty::OpaqueTypeKey<'tcx>,
433433
map: FxHashMap<GenericArg<'tcx>, GenericArg<'tcx>>,
434434
map_missing_regions_to_empty: bool,
435435

@@ -443,14 +443,14 @@ struct ReverseMapper<'tcx> {
443443
impl<'tcx> ReverseMapper<'tcx> {
444444
fn new(
445445
tcx: TyCtxt<'tcx>,
446-
opaque_type_def_id: LocalDefId,
446+
key: ty::OpaqueTypeKey<'tcx>,
447447
map: FxHashMap<GenericArg<'tcx>, GenericArg<'tcx>>,
448448
hidden_ty: Ty<'tcx>,
449449
span: Span,
450450
) -> Self {
451451
Self {
452452
tcx,
453-
opaque_type_def_id,
453+
key,
454454
map,
455455
map_missing_regions_to_empty: false,
456456
hidden_ty: Some(hidden_ty),
@@ -504,7 +504,7 @@ impl<'tcx> TypeFolder<'tcx> for ReverseMapper<'tcx> {
504504
}
505505
}
506506

507-
let generics = self.tcx().generics_of(self.opaque_type_def_id);
507+
let generics = self.tcx().generics_of(self.key.def_id);
508508
match self.map.get(&r.into()).map(|k| k.unpack()) {
509509
Some(GenericArgKind::Lifetime(r1)) => r1,
510510
Some(u) => panic!("region mapped to unexpected kind: {:?}", u),
@@ -513,9 +513,10 @@ impl<'tcx> TypeFolder<'tcx> for ReverseMapper<'tcx> {
513513
if let Some(hidden_ty) = self.hidden_ty.take() {
514514
unexpected_hidden_region_diagnostic(
515515
self.tcx,
516-
self.tcx.def_span(self.opaque_type_def_id),
516+
self.tcx.def_span(self.key.def_id),
517517
hidden_ty,
518518
r,
519+
self.key,
519520
)
520521
.emit();
521522
}

compiler/rustc_infer/src/infer/error_reporting/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,14 @@ pub fn unexpected_hidden_region_diagnostic<'tcx>(
237237
span: Span,
238238
hidden_ty: Ty<'tcx>,
239239
hidden_region: ty::Region<'tcx>,
240+
opaque_ty: ty::OpaqueTypeKey<'tcx>,
240241
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
242+
let opaque_ty = tcx.mk_opaque(opaque_ty.def_id.to_def_id(), opaque_ty.substs);
241243
let mut err = struct_span_err!(
242244
tcx.sess,
243245
span,
244246
E0700,
245-
"hidden type for `impl Trait` captures lifetime that does not appear in bounds",
247+
"hidden type for `{opaque_ty}` captures lifetime that does not appear in bounds",
246248
);
247249

248250
// Explain the region we are capturing.

compiler/rustc_infer/src/infer/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -974,14 +974,14 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
974974
#[instrument(skip(self), level = "debug")]
975975
pub fn member_constraint(
976976
&self,
977-
opaque_type_def_id: LocalDefId,
977+
key: ty::OpaqueTypeKey<'tcx>,
978978
definition_span: Span,
979979
hidden_ty: Ty<'tcx>,
980980
region: ty::Region<'tcx>,
981981
in_regions: &Lrc<Vec<ty::Region<'tcx>>>,
982982
) {
983983
self.inner.borrow_mut().unwrap_region_constraints().member_constraint(
984-
opaque_type_def_id,
984+
key,
985985
definition_span,
986986
hidden_ty,
987987
region,

compiler/rustc_infer/src/infer/opaque_types.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -394,15 +394,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
394394
);
395395

396396
concrete_ty.visit_with(&mut ConstrainOpaqueTypeRegionVisitor {
397-
op: |r| {
398-
self.member_constraint(
399-
opaque_type_key.def_id,
400-
span,
401-
concrete_ty,
402-
r,
403-
&choice_regions,
404-
)
405-
},
397+
op: |r| self.member_constraint(opaque_type_key, span, concrete_ty, r, &choice_regions),
406398
});
407399
}
408400

compiler/rustc_infer/src/infer/region_constraints/mod.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use rustc_data_structures::intern::Interned;
1212
use rustc_data_structures::sync::Lrc;
1313
use rustc_data_structures::undo_log::UndoLogs;
1414
use rustc_data_structures::unify as ut;
15-
use rustc_hir::def_id::LocalDefId;
1615
use rustc_index::vec::IndexVec;
1716
use rustc_middle::infer::unify_key::{RegionVidKey, UnifiedRegion};
1817
use rustc_middle::ty::ReStatic;
@@ -533,7 +532,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
533532

534533
pub fn member_constraint(
535534
&mut self,
536-
opaque_type_def_id: LocalDefId,
535+
key: ty::OpaqueTypeKey<'tcx>,
537536
definition_span: Span,
538537
hidden_ty: Ty<'tcx>,
539538
member_region: ty::Region<'tcx>,
@@ -546,7 +545,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
546545
}
547546

548547
self.data.member_constraints.push(MemberConstraint {
549-
opaque_type_def_id,
548+
key,
550549
definition_span,
551550
hidden_ty,
552551
member_region,

compiler/rustc_middle/src/infer/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ pub mod canonical;
22
pub mod unify_key;
33

44
use crate::ty::Region;
5-
use crate::ty::Ty;
5+
use crate::ty::{OpaqueTypeKey, Ty};
66
use rustc_data_structures::sync::Lrc;
7-
use rustc_hir::def_id::LocalDefId;
87
use rustc_span::Span;
98

109
/// Requires that `region` must be equal to one of the regions in `choice_regions`.
@@ -15,8 +14,9 @@ use rustc_span::Span;
1514
/// ```
1615
#[derive(Debug, Clone, HashStable, TypeFoldable, TypeVisitable, Lift)]
1716
pub struct MemberConstraint<'tcx> {
18-
/// The `DefId` of the opaque type causing this constraint: used for error reporting.
19-
pub opaque_type_def_id: LocalDefId,
17+
/// The `DefId` and substs of the opaque type causing this constraint.
18+
/// Used for error reporting.
19+
pub key: OpaqueTypeKey<'tcx>,
2020

2121
/// The span where the hidden type was instantiated.
2222
pub definition_span: Span,

src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-one.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LL | | }
1313
|
1414
= help: consider adding the following bound: `'a: 'b`
1515

16-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
16+
error[E0700]: hidden type for `impl Trait<'a>` captures lifetime that does not appear in bounds
1717
--> $DIR/ret-impl-trait-one.rs:16:80
1818
|
1919
LL | async fn async_ret_impl_trait1<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a> {

src/test/ui/impl-trait/hidden-lifetimes.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
1+
error[E0700]: hidden type for `impl Swap` captures lifetime that does not appear in bounds
22
--> $DIR/hidden-lifetimes.rs:29:5
33
|
44
LL | fn hide_ref<'a, 'b, T: 'static>(x: &'a mut &'b T) -> impl Swap + 'a {
@@ -11,7 +11,7 @@ help: to declare that the `impl Trait` captures `'b`, you can add an explicit `'
1111
LL | fn hide_ref<'a, 'b, T: 'static>(x: &'a mut &'b T) -> impl Swap + 'a + 'b {
1212
| ++++
1313

14-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
14+
error[E0700]: hidden type for `impl Swap` captures lifetime that does not appear in bounds
1515
--> $DIR/hidden-lifetimes.rs:46:5
1616
|
1717
LL | fn hide_rc_refcell<'a, 'b: 'a, T: 'static>(x: Rc<RefCell<&'b T>>) -> impl Swap + 'a {

src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
2020
let _: &'b i32 = *u.0;
2121
}
2222
u.0
23-
//~^ ERROR hidden type for `impl Trait` captures lifetime that does not appear in bounds
23+
//~^ ERROR hidden type for `E<'b, 'c>` captures lifetime that does not appear in bounds
2424
}
2525

2626
fn main() {}

src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
1+
error[E0700]: hidden type for `E<'b, 'c>` captures lifetime that does not appear in bounds
22
--> $DIR/error-handling-2.rs:22:5
33
|
44
LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {

src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ where
2626
// 'a in ['d, 'e]
2727
// ```
2828
if condition() { a } else { b }
29-
//~^ ERROR hidden type for `impl Trait` captures lifetime that does not appear in bounds
29+
//~^ ERROR hidden type for `impl Trait<'d, 'e>` captures lifetime that does not appear in bounds
3030
}
3131

3232
fn condition() -> bool {

src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
1+
error[E0700]: hidden type for `impl Trait<'d, 'e>` captures lifetime that does not appear in bounds
22
--> $DIR/ordinary-bounds-unrelated.rs:28:33
33
|
44
LL | fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e>

src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b>
2929
//
3030
// We are forced to pick that '0 = 'e, because only 'e is outlived by *both* 'a and 'b.
3131
if condition() { a } else { b }
32-
//~^ ERROR hidden type for `impl Trait` captures lifetime that does not appear in bounds
32+
//~^ ERROR hidden type for `impl Trait<'a, 'b>` captures lifetime that does not appear in bounds
3333
}
3434

3535
fn condition() -> bool {

src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
1+
error[E0700]: hidden type for `impl Trait<'a, 'b>` captures lifetime that does not appear in bounds
22
--> $DIR/ordinary-bounds-unsuited.rs:31:33
33
|
44
LL | fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b>

src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
1+
error[E0700]: hidden type for `impl Copy` captures lifetime that does not appear in bounds
22
--> $DIR/must_outlive_least_region_or_bound.rs:3:35
33
|
44
LL | fn elided(x: &i32) -> impl Copy { x }
@@ -11,7 +11,7 @@ help: to declare that the `impl Trait` captures `'_`, you can add an explicit `'
1111
LL | fn elided(x: &i32) -> impl Copy + '_ { x }
1212
| ++++
1313

14-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
14+
error[E0700]: hidden type for `impl Copy` captures lifetime that does not appear in bounds
1515
--> $DIR/must_outlive_least_region_or_bound.rs:6:44
1616
|
1717
LL | fn explicit<'a>(x: &'a i32) -> impl Copy { x }
@@ -96,7 +96,7 @@ help: alternatively, add an explicit `'static` bound to this reference
9696
LL | fn with_bound<'a>(x: &'static i32) -> impl LifetimeTrait<'a> + 'static { x }
9797
| ~~~~~~~~~~~~
9898

99-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
99+
error[E0700]: hidden type for `impl Fn(&'a u32)` captures lifetime that does not appear in bounds
100100
--> $DIR/must_outlive_least_region_or_bound.rs:38:5
101101
|
102102
LL | fn move_lifetime_into_fn<'a, 'b>(x: &'a u32, y: &'b u32) -> impl Fn(&'a u32) {

src/test/ui/impl-trait/region-escape-via-bound.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y>
1515
where 'x: 'y
1616
{
1717
x
18-
//~^ ERROR hidden type for `impl Trait` captures lifetime that does not appear in bounds [E0700]
18+
//~^ ERROR hidden type for `impl Trait<'y>` captures lifetime that does not appear in bounds [E0700]
1919
}
2020

2121
fn main() { }

src/test/ui/impl-trait/region-escape-via-bound.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
1+
error[E0700]: hidden type for `impl Trait<'y>` captures lifetime that does not appear in bounds
22
--> $DIR/region-escape-via-bound.rs:17:5
33
|
44
LL | fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y>

src/test/ui/impl-trait/static-return-lifetime-infered.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
1+
error[E0700]: hidden type for `impl Iterator<Item = u32>` captures lifetime that does not appear in bounds
22
--> $DIR/static-return-lifetime-infered.rs:7:9
33
|
44
LL | fn iter_values_anon(&self) -> impl Iterator<Item=u32> {
@@ -11,7 +11,7 @@ help: to declare that the `impl Trait` captures `'_`, you can add an explicit `'
1111
LL | fn iter_values_anon(&self) -> impl Iterator<Item=u32> + '_ {
1212
| ++++
1313

14-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
14+
error[E0700]: hidden type for `impl Iterator<Item = u32>` captures lifetime that does not appear in bounds
1515
--> $DIR/static-return-lifetime-infered.rs:7:9
1616
|
1717
LL | fn iter_values_anon(&self) -> impl Iterator<Item=u32> {
@@ -24,7 +24,7 @@ help: to declare that the `impl Trait` captures `'_`, you can add an explicit `'
2424
LL | fn iter_values_anon(&self) -> impl Iterator<Item=u32> + '_ {
2525
| ++++
2626

27-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
27+
error[E0700]: hidden type for `impl Iterator<Item = u32>` captures lifetime that does not appear in bounds
2828
--> $DIR/static-return-lifetime-infered.rs:12:9
2929
|
3030
LL | fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> {
@@ -37,7 +37,7 @@ help: to declare that the `impl Trait` captures `'a`, you can add an explicit `'
3737
LL | fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> + 'a {
3838
| ++++
3939

40-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
40+
error[E0700]: hidden type for `impl Iterator<Item = u32>` captures lifetime that does not appear in bounds
4141
--> $DIR/static-return-lifetime-infered.rs:12:9
4242
|
4343
LL | fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> {

src/test/ui/nll/issue-73159-rpit-static.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
1+
error[E0700]: hidden type for `impl Iterator<Item = u8>` captures lifetime that does not appear in bounds
22
--> $DIR/issue-73159-rpit-static.rs:8:9
33
|
44
LL | impl<'a> Foo<'a> {

src/test/ui/nll/ty-outlives/impl-trait-captures.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
1+
error[E0700]: hidden type for `Opaque(DefId(0:11 ~ impl_trait_captures[1afc]::foo::{opaque#0}), [ReStatic, T, ReEarlyBound(0, 'a)])` captures lifetime that does not appear in bounds
22
--> $DIR/impl-trait-captures.rs:11:5
33
|
44
LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> {

src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
1+
error[E0700]: hidden type for `impl Clone` captures lifetime that does not appear in bounds
22
--> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:48
33
|
44
LL | async fn f(self: Pin<&Self>) -> impl Clone { self }

src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
1+
error[E0700]: hidden type for `impl Clone` captures lifetime that does not appear in bounds
22
--> $DIR/arbitrary_self_types_pin_lifetime_impl_trait.rs:6:44
33
|
44
LL | fn f(self: Pin<&Self>) -> impl Clone { self }

src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ where
1717
G: Get<T>,
1818
{
1919
move || {
20-
//~^ ERROR hidden type for `impl Trait` captures lifetime
20+
//~^ ERROR hidden type for `impl FnOnce()` captures lifetime
2121
*dest = g.get();
2222
}
2323
}

src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | fn baz<G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
66
| |
77
| help: consider introducing lifetime `'a` here: `'a,`
88

9-
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
9+
error[E0700]: hidden type for `impl FnOnce()` captures lifetime that does not appear in bounds
1010
--> $DIR/missing-lifetimes-in-signature.rs:19:5
1111
|
1212
LL | fn foo<G, T>(g: G, dest: &mut T) -> impl FnOnce()

0 commit comments

Comments
 (0)