summaryrefslogtreecommitdiffstats
path: root/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr b/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr
new file mode 100644
index 000000000..a07181ad5
--- /dev/null
+++ b/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr
@@ -0,0 +1,15 @@
+error: lifetime may not live long enough
+ --> $DIR/regions-variance-covariant-use-contravariant.rs:23:12
+ |
+LL | fn use_<'short,'long>(c: Covariant<'long>,
+ | ------ ----- lifetime `'long` defined here
+ | |
+ | lifetime `'short` defined here
+...
+LL | let _: Covariant<'short> = c;
+ | ^^^^^^^^^^^^^^^^^ type annotation requires that `'short` must outlive `'long`
+ |
+ = help: consider adding the following bound: `'short: 'long`
+
+error: aborting due to previous error
+