]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/region-escape-via-bound.stderr
New upstream version 1.26.0+dfsg1
[rustc.git] / src / test / ui / impl-trait / region-escape-via-bound.stderr
CommitLineData
0531ce1d
XL
1error[E0909]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2 --> $DIR/region-escape-via-bound.rs:26:29
3 |
4LL | fn foo(x: Cell<&'x u32>) -> impl Trait<'y>
5 | ^^^^^^^^^^^^^^
6 |
7note: hidden type `std::cell::Cell<&'x u32>` captures the lifetime 'x as defined on the function body at 26:1
8 --> $DIR/region-escape-via-bound.rs:26:1
9 |
10LL | / fn foo(x: Cell<&'x u32>) -> impl Trait<'y>
11LL | | //~^ ERROR hidden type for `impl Trait` captures lifetime that does not appear in bounds [E0909]
12LL | | where 'x: 'y
13LL | | {
14LL | | x
15LL | | }
16 | |_^
17
18error: aborting due to previous error
19
20For more information about this error, try `rustc --explain E0909`.