summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issue-76547.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/issue-76547.stderr')
-rw-r--r--tests/ui/async-await/issue-76547.stderr32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/ui/async-await/issue-76547.stderr b/tests/ui/async-await/issue-76547.stderr
new file mode 100644
index 000000000..4d96cce82
--- /dev/null
+++ b/tests/ui/async-await/issue-76547.stderr
@@ -0,0 +1,32 @@
+error: lifetime may not live long enough
+ --> $DIR/issue-76547.rs:20:13
+ |
+LL | async fn fut(bufs: &mut [&mut [u8]]) {
+ | - - let's call the lifetime of this reference `'2`
+ | |
+ | let's call the lifetime of this reference `'1`
+LL | ListFut(bufs).await
+ | ^^^^ this usage requires that `'1` must outlive `'2`
+ |
+help: consider introducing a named lifetime parameter
+ |
+LL | async fn fut<'a>(bufs: &'a mut [&'a mut [u8]]) {
+ | ++++ ++ ++
+
+error: lifetime may not live long enough
+ --> $DIR/issue-76547.rs:34:14
+ |
+LL | async fn fut2(bufs: &mut [&mut [u8]]) -> i32 {
+ | - - let's call the lifetime of this reference `'2`
+ | |
+ | let's call the lifetime of this reference `'1`
+LL | ListFut2(bufs).await
+ | ^^^^ this usage requires that `'1` must outlive `'2`
+ |
+help: consider introducing a named lifetime parameter
+ |
+LL | async fn fut2<'a>(bufs: &'a mut [&'a mut [u8]]) -> i32 {
+ | ++++ ++ ++
+
+error: aborting due to 2 previous errors
+