summaryrefslogtreecommitdiffstats
path: root/src/test/ui/mismatched_types/issue-74918-missing-lifetime.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/mismatched_types/issue-74918-missing-lifetime.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/mismatched_types/issue-74918-missing-lifetime.stderr')
-rw-r--r--src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr b/src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr
new file mode 100644
index 000000000..94a9c9757
--- /dev/null
+++ b/src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr
@@ -0,0 +1,30 @@
+error[E0106]: missing lifetime specifier
+ --> $DIR/issue-74918-missing-lifetime.rs:9:30
+ |
+LL | type Item = IteratorChunk<T, S>;
+ | ^ expected named lifetime parameter
+ |
+help: consider introducing a named lifetime parameter
+ |
+LL | type Item<'a> = IteratorChunk<'a, T, S>;
+ | ++++ +++
+
+error: `impl` item signature doesn't match `trait` item signature
+ --> $DIR/issue-74918-missing-lifetime.rs:11:5
+ |
+LL | fn next(&mut self) -> Option<IteratorChunk<T, S>> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'1, T, S>>`
+ |
+ ::: $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+ |
+LL | fn next(&mut self) -> Option<Self::Item>;
+ | ----------------------------------------- expected `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'static, T, S>>`
+ |
+ = note: expected `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'static, T, S>>`
+ found `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'1, T, S>>`
+ = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
+ = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0106`.