rust/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr
Matthew Jasper 27ea8117e7 Enable NLL compare mode for more tests
These tests were disabled due to NLL bugs that have since been fixed.
2018-09-27 22:30:04 +01:00

19 lines
667 B
Plaintext

error[E0308]: mismatched types
--> $DIR/regions-variance-invariant-use-covariant.rs:27:33
|
LL | let _: Invariant<'static> = c; //~ ERROR mismatched types
| ^ lifetime mismatch
|
= note: expected type `Invariant<'static>`
found type `Invariant<'b>`
note: the lifetime 'b as defined on the function body at 21:9...
--> $DIR/regions-variance-invariant-use-covariant.rs:21:9
|
LL | fn use_<'b>(c: Invariant<'b>) {
| ^^
= note: ...does not necessarily outlive the static lifetime
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.