]> git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/issues/issue-92305.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / impl-trait / issues / issue-92305.stderr
1 error[E0107]: missing generics for struct `Vec`
2 --> $DIR/issue-92305.rs:5:45
3 |
4 LL | fn f<T>(data: &[T]) -> impl Iterator<Item = Vec> {
5 | ^^^ expected at least 1 generic argument
6 |
7 note: struct defined here, with at least 1 generic parameter: `T`
8 --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
9 |
10 LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
11 | ^^^ -
12 help: add missing generic argument
13 |
14 LL | fn f<T>(data: &[T]) -> impl Iterator<Item = Vec<T>> {
15 | ~~~~~~
16
17 error[E0282]: type annotations needed
18 --> $DIR/issue-92305.rs:7:5
19 |
20 LL | iter::empty()
21 | ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
22 |
23 help: consider specifying the generic argument
24 |
25 LL | iter::empty::<T>()
26 | +++++
27
28 error[E0282]: type annotations needed
29 --> $DIR/issue-92305.rs:10:35
30 |
31 LL | fn g<T>(data: &[T], target: T) -> impl Iterator<Item = Vec<T>> {
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
33
34 error: aborting due to 3 previous errors
35
36 Some errors have detailed explanations: E0107, E0282.
37 For more information about an error, try `rustc --explain E0107`.