blob: 2ccf36713ae89ded3f92846429781498e7ccd436 [file] [log] [blame]
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