]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-50480.stderr
point at private fields in struct literal
[rust.git] / src / test / ui / issues / issue-50480.stderr
1 error[E0412]: cannot find type `N` in this scope
2   --> $DIR/issue-50480.rs:3:12
3    |
4 LL | struct Foo(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
5    |           -^ not found in this scope
6    |           |
7    |           help: you might be missing a type parameter: `<N>`
8
9 error[E0412]: cannot find type `NotDefined` in this scope
10   --> $DIR/issue-50480.rs:3:15
11    |
12 LL | struct Foo(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
13    |               ^^^^^^^^^^ not found in this scope
14
15 error[E0412]: cannot find type `N` in this scope
16   --> $DIR/issue-50480.rs:3:12
17    |
18 LL | struct Foo(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
19    |           -^ not found in this scope
20    |           |
21    |           help: you might be missing a type parameter: `<N>`
22
23 error[E0412]: cannot find type `NotDefined` in this scope
24   --> $DIR/issue-50480.rs:3:15
25    |
26 LL | struct Foo(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
27    |           -   ^^^^^^^^^^ not found in this scope
28    |           |
29    |           help: you might be missing a type parameter: `<NotDefined>`
30
31 error[E0412]: cannot find type `N` in this scope
32   --> $DIR/issue-50480.rs:12:18
33    |
34 LL | struct Bar<T>(T, N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
35    |            -     ^
36    |            |
37    |            similarly named type parameter `T` defined here
38    |
39 help: a type parameter with a similar name exists
40    |
41 LL | struct Bar<T>(T, T, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
42    |                  ~
43 help: you might be missing a type parameter
44    |
45 LL | struct Bar<T, N>(T, N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
46    |             +++
47
48 error[E0412]: cannot find type `NotDefined` in this scope
49   --> $DIR/issue-50480.rs:12:21
50    |
51 LL | struct Bar<T>(T, N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
52    |                     ^^^^^^^^^^ not found in this scope
53
54 error[E0277]: `i32` is not an iterator
55   --> $DIR/issue-50480.rs:3:27
56    |
57 LL | struct Foo(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
58    |                           ^^^^^^^^^^^^^^^^^^^^^^^ `i32` is not an iterator
59    |
60    = help: the trait `Iterator` is not implemented for `i32`
61    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
62
63 error[E0204]: the trait `Copy` may not be implemented for this type
64   --> $DIR/issue-50480.rs:1:17
65    |
66 LL | #[derive(Clone, Copy)]
67    |                 ^^^^
68 LL |
69 LL | struct Foo(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
70    |                                                    --------  ------ this field does not implement `Copy`
71    |                                                    |
72    |                                                    this field does not implement `Copy`
73    |
74    = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
75
76 error[E0277]: `i32` is not an iterator
77   --> $DIR/issue-50480.rs:12:33
78    |
79 LL | struct Bar<T>(T, N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
80    |                                 ^^^^^^^^^^^^^^^^^^^^^^^ `i32` is not an iterator
81    |
82    = help: the trait `Iterator` is not implemented for `i32`
83    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
84
85 error[E0204]: the trait `Copy` may not be implemented for this type
86   --> $DIR/issue-50480.rs:10:17
87    |
88 LL | #[derive(Clone, Copy)]
89    |                 ^^^^
90 LL |
91 LL | struct Bar<T>(T, N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
92    |                                                          --------  ------ this field does not implement `Copy`
93    |                                                          |
94    |                                                          this field does not implement `Copy`
95    |
96    = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
97
98 error: aborting due to 10 previous errors
99
100 Some errors have detailed explanations: E0204, E0277, E0412.
101 For more information about an error, try `rustc --explain E0204`.