summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/outlives-suggestion-more.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/nll/outlives-suggestion-more.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/nll/outlives-suggestion-more.stderr')
-rw-r--r--src/test/ui/nll/outlives-suggestion-more.stderr96
1 files changed, 96 insertions, 0 deletions
diff --git a/src/test/ui/nll/outlives-suggestion-more.stderr b/src/test/ui/nll/outlives-suggestion-more.stderr
new file mode 100644
index 000000000..c8c604b5b
--- /dev/null
+++ b/src/test/ui/nll/outlives-suggestion-more.stderr
@@ -0,0 +1,96 @@
+error: lifetime may not live long enough
+ --> $DIR/outlives-suggestion-more.rs:5:5
+ |
+LL | fn foo1<'a, 'b, 'c, 'd>(x: &'a usize, y: &'b usize) -> (&'c usize, &'d usize) {
+ | -- -- lifetime `'c` defined here
+ | |
+ | lifetime `'a` defined here
+LL | (x, y)
+ | ^^^^^^ function was supposed to return data with lifetime `'c` but it is returning data with lifetime `'a`
+ |
+ = help: consider adding the following bound: `'a: 'c`
+
+error: lifetime may not live long enough
+ --> $DIR/outlives-suggestion-more.rs:5:5
+ |
+LL | fn foo1<'a, 'b, 'c, 'd>(x: &'a usize, y: &'b usize) -> (&'c usize, &'d usize) {
+ | -- -- lifetime `'d` defined here
+ | |
+ | lifetime `'b` defined here
+LL | (x, y)
+ | ^^^^^^ function was supposed to return data with lifetime `'d` but it is returning data with lifetime `'b`
+ |
+ = help: consider adding the following bound: `'b: 'd`
+
+help: the following changes may resolve your lifetime errors
+ |
+ = help: add bound `'a: 'c`
+ = help: add bound `'b: 'd`
+
+error: lifetime may not live long enough
+ --> $DIR/outlives-suggestion-more.rs:11:5
+ |
+LL | fn foo2<'a, 'b, 'c>(x: &'a usize, y: &'b usize) -> (&'c usize, &'static usize) {
+ | -- -- lifetime `'c` defined here
+ | |
+ | lifetime `'a` defined here
+LL | (x, y)
+ | ^^^^^^ function was supposed to return data with lifetime `'c` but it is returning data with lifetime `'a`
+ |
+ = help: consider adding the following bound: `'a: 'c`
+
+error: lifetime may not live long enough
+ --> $DIR/outlives-suggestion-more.rs:11:5
+ |
+LL | fn foo2<'a, 'b, 'c>(x: &'a usize, y: &'b usize) -> (&'c usize, &'static usize) {
+ | -- lifetime `'b` defined here
+LL | (x, y)
+ | ^^^^^^ returning this value requires that `'b` must outlive `'static`
+
+help: the following changes may resolve your lifetime errors
+ |
+ = help: add bound `'a: 'c`
+ = help: replace `'b` with `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/outlives-suggestion-more.rs:21:5
+ |
+LL | fn foo3<'a, 'b, 'c, 'd, 'e>(
+ | -- -- lifetime `'b` defined here
+ | |
+ | lifetime `'a` defined here
+...
+LL | (x, y, z)
+ | ^^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
+ |
+ = help: consider adding the following bound: `'a: 'b`
+
+error: lifetime may not live long enough
+ --> $DIR/outlives-suggestion-more.rs:21:5
+ |
+LL | fn foo3<'a, 'b, 'c, 'd, 'e>(
+ | -- -- lifetime `'b` defined here
+ | |
+ | lifetime `'a` defined here
+...
+LL | (x, y, z)
+ | ^^^^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
+ |
+ = help: consider adding the following bound: `'b: 'a`
+
+error: lifetime may not live long enough
+ --> $DIR/outlives-suggestion-more.rs:21:5
+ |
+LL | fn foo3<'a, 'b, 'c, 'd, 'e>(
+ | -- lifetime `'c` defined here
+...
+LL | (x, y, z)
+ | ^^^^^^^^^ returning this value requires that `'c` must outlive `'static`
+
+help: the following changes may resolve your lifetime errors
+ |
+ = help: `'a` and `'b` must be the same: replace one with the other
+ = help: replace `'c` with `'static`
+
+error: aborting due to 7 previous errors
+