diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2024-08-22 02:10:45 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2024-08-22 02:20:05 +0000 |
| commit | ca7c55f0502f1e25bfaf9191bd7e145645eb3d03 (patch) | |
| tree | 760d81c943f20a8a9abc863a00a296185bd9ca33 /tests/ui/issues | |
| parent | a32d4a0e822a29a6682e08b75a8df4c29c7fa9f1 (diff) | |
| download | rust-ca7c55f0502f1e25bfaf9191bd7e145645eb3d03.tar.gz rust-ca7c55f0502f1e25bfaf9191bd7e145645eb3d03.zip | |
Do not rely on names to find lifetimes.
Diffstat (limited to 'tests/ui/issues')
| -rw-r--r-- | tests/ui/issues/issue-20831-debruijn.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/issues/issue-37884.stderr | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/tests/ui/issues/issue-20831-debruijn.stderr b/tests/ui/issues/issue-20831-debruijn.stderr index 60721f001b7..fe310998f09 100644 --- a/tests/ui/issues/issue-20831-debruijn.stderr +++ b/tests/ui/issues/issue-20831-debruijn.stderr @@ -5,10 +5,10 @@ LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the anonymous lifetime as defined here... - --> $DIR/issue-20831-debruijn.rs:28:18 + --> $DIR/issue-20831-debruijn.rs:28:67 | LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) { - | ^ + | ^^^^^^^^^ note: ...but the lifetime must also be valid for the lifetime `'a` as defined here... --> $DIR/issue-20831-debruijn.rs:26:6 | diff --git a/tests/ui/issues/issue-37884.stderr b/tests/ui/issues/issue-37884.stderr index b7c0095d682..17037d2180d 100644 --- a/tests/ui/issues/issue-37884.stderr +++ b/tests/ui/issues/issue-37884.stderr @@ -7,10 +7,7 @@ LL | fn next(&'a mut self) -> Option<Self::Item> = note: expected signature `fn(&mut RepeatMut<'_, _>) -> Option<_>` found signature `fn(&'a mut RepeatMut<'_, _>) -> Option<_>` note: the anonymous lifetime as defined here... - --> $DIR/issue-37884.rs:6:5 - | -LL | fn next(&'a mut self) -> Option<Self::Item> - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL note: ...does not necessarily outlive the lifetime `'a` as defined here --> $DIR/issue-37884.rs:3:6 | |
