summaryrefslogtreecommitdiffstats
path: root/tests/ui/mir/field-projection-mutating-context2.stderr
blob: a7b66fe10ce717a1c919dc136d01495938bdc134 (plain)
1
2
3
4
5
6
7
8
9
10
error: lifetime may not live long enough
  --> $DIR/field-projection-mutating-context2.rs:8:25
   |
LL | fn foo<'a>(mut x: Foo<fn(&'a str)>, string: &'a str) {
   |        -- lifetime `'a` defined here
LL |     let Foo(ref mut y): Foo<fn(&'static str)> = x;
   |                         ^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`

error: aborting due to previous error