1 error[E0308]: mismatched types
2 --> $DIR/regions-infer-invariance-due-to-decl.rs:12:5
5 | ^^^^^^^ lifetime mismatch
7 = note: expected struct `Invariant<'static>`
8 found struct `Invariant<'r>`
9 note: the lifetime `'r` as defined on the function body at 11:23...
10 --> $DIR/regions-infer-invariance-due-to-decl.rs:11:23
12 LL | fn to_longer_lifetime<'r>(b_isize: Invariant<'r>) -> Invariant<'static> {
14 = note: ...does not necessarily outlive the static lifetime
16 error: aborting due to previous error
18 For more information about this error, try `rustc --explain E0308`.