rust/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
395 B
Plaintext
Raw Normal View History

error: lifetime may not live long enough
2024-08-25 16:56:06 -04:00
--> $DIR/implied-bounds-on-nested-references-plus-variance.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