about summary refs log tree commit diff
path: root/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.stderr
blob: c96fa92937b0c5574e22837827d781f97f5f95a4 (plain)
1
2
3
4
5
6
7
8
9
10
error: lifetime may not live long enough
  --> $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