fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0700]: hidden type for `impl Trait<'y>` captures lifetime that does not appear in bounds 2 --> $DIR/region-escape-via-bound.rs:17:5 3 | 4LL | fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y> 5 | -- -------------- opaque type defined here 6 | | 7 | hidden type `Cell<&'x u32>` captures the lifetime `'x` as defined here 8... 9LL | x 10 | ^ 11 | 12help: to declare that `impl Trait<'y>` captures `'x`, you can add an explicit `'x` lifetime bound 13 | 14LL | fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y> + 'x 15 | ++++ 16 17error: aborting due to previous error 18 19For more information about this error, try `rustc --explain E0700`.