summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lub-glb/empty-binders-err.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/lub-glb/empty-binders-err.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/lub-glb/empty-binders-err.stderr')
-rw-r--r--src/test/ui/lub-glb/empty-binders-err.stderr59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/test/ui/lub-glb/empty-binders-err.stderr b/src/test/ui/lub-glb/empty-binders-err.stderr
new file mode 100644
index 000000000..f86f22d5e
--- /dev/null
+++ b/src/test/ui/lub-glb/empty-binders-err.stderr
@@ -0,0 +1,59 @@
+error: lifetime may not live long enough
+ --> $DIR/empty-binders-err.rs:20:12
+ |
+LL | fn covariance<'a, 'b, 'upper>(v: bool)
+ | -- ------ lifetime `'upper` defined here
+ | |
+ | lifetime `'a` defined here
+...
+LL | let _: &'upper () = match v {
+ | ^^^^^^^^^^ type annotation requires that `'a` must outlive `'upper`
+ |
+ = help: consider adding the following bound: `'a: 'upper`
+
+error: lifetime may not live long enough
+ --> $DIR/empty-binders-err.rs:20:12
+ |
+LL | fn covariance<'a, 'b, 'upper>(v: bool)
+ | -- ------ lifetime `'upper` defined here
+ | |
+ | lifetime `'b` defined here
+...
+LL | let _: &'upper () = match v {
+ | ^^^^^^^^^^ type annotation requires that `'b` must outlive `'upper`
+ |
+ = help: consider adding the following bound: `'b: 'upper`
+
+help: the following changes may resolve your lifetime errors
+ |
+ = help: add bound `'a: 'upper`
+ = help: add bound `'b: 'upper`
+
+error: lifetime may not live long enough
+ --> $DIR/empty-binders-err.rs:35:12
+ |
+LL | fn contra_fn<'a, 'b, 'lower>(v: bool)
+ | -- ------ lifetime `'lower` defined here
+ | |
+ | lifetime `'a` defined here
+...
+LL | let _: fn(&'lower ()) = match v {
+ | ^^^^^^^^^^^^^^ type annotation requires that `'lower` must outlive `'a`
+ |
+ = help: consider adding the following bound: `'lower: 'a`
+
+error: lifetime may not live long enough
+ --> $DIR/empty-binders-err.rs:48:12
+ |
+LL | fn contra_struct<'a, 'b, 'lower>(v: bool)
+ | -- ------ lifetime `'lower` defined here
+ | |
+ | lifetime `'a` defined here
+...
+LL | let _: Contra<'lower> = match v {
+ | ^^^^^^^^^^^^^^ type annotation requires that `'lower` must outlive `'a`
+ |
+ = help: consider adding the following bound: `'lower: 'a`
+
+error: aborting due to 4 previous errors
+