rust/tests/ui/explicit-tail-calls/ret-ty-borrowck-constraints.stderr

11 lines
365 B
Plaintext

error: lifetime may not live long enough
--> $DIR/ret-ty-borrowck-constraints.rs:5:5
|
LL | fn link(x: &str) -> &'static str {
| - let's call the lifetime of this reference `'1`
LL | become passthrough(x);
| ^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'static`
error: aborting due to 1 previous error