error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
- --> $DIR/region-escape-via-bound.rs:26:29
+ --> $DIR/region-escape-via-bound.rs:16:29
|
LL | fn foo(x: Cell<&'x u32>) -> impl Trait<'y>
| ^^^^^^^^^^^^^^
|
-note: hidden type `std::cell::Cell<&'x u32>` captures the lifetime 'x as defined on the function body at 28:7
- --> $DIR/region-escape-via-bound.rs:28:7
+note: hidden type `std::cell::Cell<&'x u32>` captures the lifetime 'x as defined on the function body at 18:7
+ --> $DIR/region-escape-via-bound.rs:18:7
|
LL | where 'x: 'y
| ^^