rust/tests/ui/type-alias-impl-trait/implied_bounds_closure.stderr

12 lines
382 B
Plaintext

error: lifetime may not live long enough
--> $DIR/implied_bounds_closure.rs:17:16
|
LL | fn extend_lifetime<'a>(x: &'a str) -> &'static str {
| -- lifetime `'a` defined here
LL | let t = into_impl(x);
LL | helper(|_| t)
| ^ returning this value requires that `'a` must outlive `'static`
error: aborting due to 1 previous error