]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/region-escape-via-bound.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / impl-trait / region-escape-via-bound.stderr
CommitLineData
064997fb 1error[E0700]: hidden type for `impl Trait<'y>` captures lifetime that does not appear in bounds
5e7ed085 2 --> $DIR/region-escape-via-bound.rs:17:5
0531ce1d 3 |
5e7ed085
FG
4LL | fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y>
5 | -- hidden type `Cell<&'x u32>` captures the lifetime `'x` as defined here
6...
7LL | x
8 | ^
0531ce1d 9 |
2b03887a 10help: to declare that `impl Trait<'y>` captures `'x`, you can add an explicit `'x` lifetime bound
0531ce1d 11 |
5e7ed085
FG
12LL | fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y> + 'x
13 | ++++
0531ce1d
XL
14
15error: aborting due to previous error
16
94b46f34 17For more information about this error, try `rustc --explain E0700`.