]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/region-escape-via-bound.stderr
move interface to the unikernel in the crate hermit-abi
[rust.git] / src / test / ui / impl-trait / region-escape-via-bound.stderr
1 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2   --> $DIR/region-escape-via-bound.rs:15:29
3    |
4 LL | fn foo(x: Cell<&'x u32>) -> impl Trait<'y>
5    |                             ^^^^^^^^^^^^^^
6    |
7 note: hidden type `std::cell::Cell<&'x u32>` captures the lifetime 'x as defined on the function body at 17:7
8   --> $DIR/region-escape-via-bound.rs:17:7
9    |
10 LL | where 'x: 'y
11    |       ^^
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0700`.