diff options
Diffstat (limited to 'src/test/ui/compile-fail-migration/variance-use-contravariant-struct-1.stderr')
| -rw-r--r-- | src/test/ui/compile-fail-migration/variance-use-contravariant-struct-1.stderr | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/compile-fail-migration/variance-use-contravariant-struct-1.stderr b/src/test/ui/compile-fail-migration/variance-use-contravariant-struct-1.stderr new file mode 100644 index 00000000000..48e0d380c66 --- /dev/null +++ b/src/test/ui/compile-fail-migration/variance-use-contravariant-struct-1.stderr @@ -0,0 +1,22 @@ +error[E0308]: mismatched types + --> $DIR/variance-use-contravariant-struct-1.rs:22:5 + | +LL | v //~ ERROR mismatched types + | ^ lifetime mismatch + | + = note: expected type `SomeStruct<&'min ()>` + found type `SomeStruct<&'max ()>` +note: the lifetime 'min as defined on the function body at 18:8... + --> $DIR/variance-use-contravariant-struct-1.rs:18:8 + | +LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>) + | ^^^^ +note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 18:13 + --> $DIR/variance-use-contravariant-struct-1.rs:18:13 + | +LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>) + | ^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. |
