]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/issue-74918-missing-lifetime.stderr
Auto merge of #101138 - Rejyr:diagnostic-migration-rustc-lint-pt2, r=davidtwco
[rust.git] / tests / ui / mismatched_types / issue-74918-missing-lifetime.stderr
1 error[E0106]: missing lifetime specifier
2   --> $DIR/issue-74918-missing-lifetime.rs:9:30
3    |
4 LL |     type Item = IteratorChunk<T, S>;
5    |                              ^ expected named lifetime parameter
6    |
7 help: consider introducing a named lifetime parameter
8    |
9 LL |     type Item<'a> = IteratorChunk<'a, T, S>;
10    |              ++++                 +++
11
12 error: `impl` item signature doesn't match `trait` item signature
13   --> $DIR/issue-74918-missing-lifetime.rs:11:5
14    |
15 LL |     fn next(&mut self) -> Option<IteratorChunk<T, S>> {
16    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'1, T, S>>`
17   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
18    |
19    = note: expected `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'static, T, S>>`
20    |
21    = note: expected signature `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'static, T, S>>`
22               found signature `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'1, T, S>>`
23    = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
24    = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
25
26 error: aborting due to 2 previous errors
27
28 For more information about this error, try `rustc --explain E0106`.