about summary refs log tree commit diff
path: root/tests/ui/regions/region-invariant-static-error-reporting.stderr
blob: 2ccf36713ae89ded3f92846429781498e7ccd436 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
error: lifetime may not live long enough
  --> $DIR/region-invariant-static-error-reporting.rs:16:9
   |
LL | fn unify<'a>(x: Option<Invariant<'a>>, f: fn(Invariant<'a>)) {
   |          -- lifetime `'a` defined here
...
LL |         mk_static()
   |         ^^^^^^^^^^^ assignment requires that `'a` must outlive `'static`
   |
   = note: requirement occurs because of the type `Invariant<'_>`, which makes the generic argument `'_` invariant
   = note: the struct `Invariant<'a>` is invariant over the parameter `'a`
   = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance

error: aborting due to 1 previous error