fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
542 B15 linesraw
1error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2  --> $DIR/region-escape-via-bound.rs:15: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 17:7
8  --> $DIR/region-escape-via-bound.rs:17:7
9   |
10LL | where 'x: 'y
11   |       ^^
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0700`.