about summary refs log tree commit diff
path: root/tests/ui/async-await
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2025-08-29 20:14:01 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-09-28 20:55:34 +0000
commit7a0319f01d08e541c8e16febaa68c5fa8b66b586 (patch)
treeec121637a9fd9181f608a83bd24b53c3ad3b2f22 /tests/ui/async-await
parentc3e0b29e79f347edf7e0ae559bfec2d3cdf353d8 (diff)
downloadrust-7a0319f01d08e541c8e16febaa68c5fa8b66b586.tar.gz
rust-7a0319f01d08e541c8e16febaa68c5fa8b66b586.zip
Point at lifetime requirement origin in more cases
Diffstat (limited to 'tests/ui/async-await')
-rw-r--r--tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.stderr14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.stderr b/tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.stderr
index e99ff763b9a..e0776c81dff 100644
--- a/tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.stderr
+++ b/tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.stderr
@@ -29,7 +29,7 @@ LL |     outlives::<'a>(call_once(c));
 LL | }
    | - `c` dropped here while still borrowed
    |
-note: requirement that `c` is borrowed for `'a` introduced here
+note: requirement for `'a` introduced here
   --> $DIR/without-precise-captures-we-are-powerless.rs:7:33
    |
 LL | fn outlives<'a>(_: impl Sized + 'a) {}
@@ -80,7 +80,7 @@ LL |     outlives::<'a>(call_once(c));
 LL | }
    | - `c` dropped here while still borrowed
    |
-note: requirement that `c` is borrowed for `'a` introduced here
+note: requirement for `'a` introduced here
   --> $DIR/without-precise-captures-we-are-powerless.rs:7:33
    |
 LL | fn outlives<'a>(_: impl Sized + 'a) {}
@@ -101,6 +101,12 @@ LL |     outlives::<'a>(c());
    |     argument requires that `c` is borrowed for `'a`
 LL |     outlives::<'a>(call_once(c));
    |                              ^ move out of `c` occurs here
+   |
+note: requirement for `'a` introduced here
+  --> $DIR/without-precise-captures-we-are-powerless.rs:7:33
+   |
+LL | fn outlives<'a>(_: impl Sized + 'a) {}
+   |                                 ^^
 
 error[E0597]: `x` does not live long enough
   --> $DIR/without-precise-captures-we-are-powerless.rs:36:13
@@ -142,7 +148,7 @@ LL |     outlives::<'a>(call_once(c));
 LL | }
    | - `c` dropped here while still borrowed
    |
-note: requirement that `c` is borrowed for `'a` introduced here
+note: requirement for `'a` introduced here
   --> $DIR/without-precise-captures-we-are-powerless.rs:7:33
    |
 LL | fn outlives<'a>(_: impl Sized + 'a) {}
@@ -190,7 +196,7 @@ LL |     T.outlives::<'a>(call_once(c));
 LL | }
    | - `c` dropped here while still borrowed
    |
-note: requirement that `c` is borrowed for `'a` introduced here
+note: requirement for `'a` introduced here
   --> $DIR/without-precise-captures-we-are-powerless.rs:49:47
    |
 LL |     fn outlives<'a>(&'a self, _: impl Sized + 'a) {}