rust/src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr

19 lines
671 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0308]: mismatched types
--> $DIR/regions-infer-invariance-due-to-decl.rs:22:5
|
LL | b_isize //~ ERROR mismatched types
| ^^^^^^^ lifetime mismatch
|
= note: expected type `Invariant<'static>`
found type `Invariant<'r>`
2018-08-08 07:28:26 -05:00
note: the lifetime 'r as defined on the function body at 21:23...
--> $DIR/regions-infer-invariance-due-to-decl.rs:21:23
|
LL | fn to_longer_lifetime<'r>(b_isize: Invariant<'r>) -> Invariant<'static> {
2018-08-08 07:28:26 -05:00
| ^^
= note: ...does not necessarily outlive the static lifetime
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.