1 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2 --> $DIR/region-escape-via-bound.rs:14:37
4 LL | fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y>
7 | hidden type `Cell<&'x u32>` captures the lifetime `'x` as defined here
9 help: to declare that the `impl Trait` captures `'x`, you can add an explicit `'x` lifetime bound
11 LL | fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y> + 'x
14 error: aborting due to previous error
16 For more information about this error, try `rustc --explain E0700`.