rust/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-early-bound.stderr
Michael Goulet 67804c57e7 Adjust tests
2024-09-05 06:37:38 -04:00

11 lines
407 B
Plaintext

error: lifetime may not live long enough
--> $DIR/implied-bounds-on-nested-references-plus-variance-early-bound.rs:8:12
|
LL | fn bad<'a, T>(x: &'a T) -> &'static T {
| -- lifetime `'a` defined here
LL | let f: fn(_, &'a T) -> &'static T = foo;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
error: aborting due to 1 previous error