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