1
1
error[E0282]: type annotations needed
2
- --> $DIR/duplicate_err.rs:6 :5
2
+ --> $DIR/duplicate_err.rs:7 :5
3
3
|
4
4
LL | iter::empty()
5
5
| ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
@@ -10,7 +10,7 @@ LL | iter::empty::<T>()
10
10
| +++++
11
11
12
12
error[E0282]: type annotations needed
13
- --> $DIR/duplicate_err.rs:10 :5
13
+ --> $DIR/duplicate_err.rs:11 :5
14
14
|
15
15
LL | iter::empty()
16
16
| ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
@@ -21,7 +21,7 @@ LL | iter::empty::<T>()
21
21
| +++++
22
22
23
23
error[E0282]: type annotations needed
24
- --> $DIR/duplicate_err.rs:14 :5
24
+ --> $DIR/duplicate_err.rs:15 :5
25
25
|
26
26
LL | iter::empty()
27
27
| ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
@@ -32,55 +32,55 @@ LL | iter::empty::<T>()
32
32
| +++++
33
33
34
34
error: unconstrained opaque type
35
- --> $DIR/duplicate_err.rs:18 :51
35
+ --> $DIR/duplicate_err.rs:19 :51
36
36
|
37
37
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
38
38
| ^^^^^^^^^
39
39
|
40
40
= note: `ETAI1` must be used in combination with a concrete type within the same crate
41
41
42
42
error: unconstrained opaque type
43
- --> $DIR/duplicate_err.rs:20 :51
43
+ --> $DIR/duplicate_err.rs:21 :51
44
44
|
45
45
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
46
46
| ^^^^^^^^^
47
47
|
48
48
= note: `ETAI2` must be used in combination with a concrete type within the same crate
49
49
50
50
error: unconstrained opaque type
51
- --> $DIR/duplicate_err.rs:22 :57
51
+ --> $DIR/duplicate_err.rs:23 :57
52
52
|
53
53
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
54
54
| ^^^^^^^^^
55
55
|
56
56
= note: `ETAI3` must be used in combination with a concrete type within the same crate
57
57
58
58
error: unconstrained opaque type
59
- --> $DIR/duplicate_err.rs:25 :14
59
+ --> $DIR/duplicate_err.rs:26 :14
60
60
|
61
61
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
62
62
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
63
63
|
64
64
= note: `ETAI4` must be used in combination with a concrete type within the same crate
65
65
66
66
error: unconstrained opaque type
67
- --> $DIR/duplicate_err.rs:27 :14
67
+ --> $DIR/duplicate_err.rs:28 :14
68
68
|
69
69
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
70
70
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
71
71
|
72
72
= note: `ETAI5` must be used in combination with a concrete type within the same crate
73
73
74
74
error: unconstrained opaque type
75
- --> $DIR/duplicate_err.rs:29 :14
75
+ --> $DIR/duplicate_err.rs:30 :14
76
76
|
77
77
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
78
78
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79
79
|
80
80
= note: `ETAI6` must be used in combination with a concrete type within the same crate
81
81
82
82
error[E0277]: `*const ()` cannot be sent between threads safely
83
- --> $DIR/duplicate_err.rs:32 :18
83
+ --> $DIR/duplicate_err.rs:33 :18
84
84
|
85
85
LL | fn mismatch() -> impl Iterator<Item: Copy, Item: Send> {
86
86
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
@@ -90,14 +90,106 @@ LL | iter::empty::<*const ()>()
90
90
= help: the trait `Send` is not implemented for `*const ()`
91
91
92
92
error[E0277]: the trait bound `String: Copy` is not satisfied
93
- --> $DIR/duplicate_err.rs:36 :20
93
+ --> $DIR/duplicate_err.rs:37 :20
94
94
|
95
95
LL | fn mismatch_2() -> impl Iterator<Item: Copy, Item: Send> {
96
96
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
97
97
LL | iter::empty::<String>()
98
98
| ----------------------- return type was inferred to be `std::iter::Empty<String>` here
99
99
100
- error: aborting due to 11 previous errors
100
+ error[E0271]: expected `Empty<u32>` to be an iterator that yields `i32`, but it yields `u32`
101
+ --> $DIR/duplicate_err.rs:74:16
102
+ |
103
+ LL | uncallable(iter::empty::<u32>());
104
+ | ---------- ^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`
105
+ | |
106
+ | required by a bound introduced by this call
107
+ |
108
+ note: required by a bound in `uncallable`
109
+ --> $DIR/duplicate_err.rs:67:32
110
+ |
111
+ LL | fn uncallable(_: impl Iterator<Item = i32, Item = u32>) {}
112
+ | ^^^^^^^^^^ required by this bound in `uncallable`
113
+
114
+ error[E0271]: expected `Empty<i32>` to be an iterator that yields `u32`, but it yields `i32`
115
+ --> $DIR/duplicate_err.rs:75:16
116
+ |
117
+ LL | uncallable(iter::empty::<i32>());
118
+ | ---------- ^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`
119
+ | |
120
+ | required by a bound introduced by this call
121
+ |
122
+ note: required by a bound in `uncallable`
123
+ --> $DIR/duplicate_err.rs:67:44
124
+ |
125
+ LL | fn uncallable(_: impl Iterator<Item = i32, Item = u32>) {}
126
+ | ^^^^^^^^^^ required by this bound in `uncallable`
127
+
128
+ error[E0271]: type mismatch resolving `<() as Trait>::ASSOC == 4`
129
+ --> $DIR/duplicate_err.rs:76:22
130
+ |
131
+ LL | uncallable_const(());
132
+ | ---------------- ^^ expected `4`, found `3`
133
+ | |
134
+ | required by a bound introduced by this call
135
+ |
136
+ = note: expected constant `4`
137
+ found constant `3`
138
+ note: required by a bound in `uncallable_const`
139
+ --> $DIR/duplicate_err.rs:69:46
140
+ |
141
+ LL | fn uncallable_const(_: impl Trait<ASSOC = 3, ASSOC = 4>) {}
142
+ | ^^^^^^^^^ required by this bound in `uncallable_const`
143
+
144
+ error[E0271]: type mismatch resolving `<u32 as Trait>::ASSOC == 3`
145
+ --> $DIR/duplicate_err.rs:77:22
146
+ |
147
+ LL | uncallable_const(4u32);
148
+ | ---------------- ^^^^ expected `3`, found `4`
149
+ | |
150
+ | required by a bound introduced by this call
151
+ |
152
+ = note: expected constant `3`
153
+ found constant `4`
154
+ note: required by a bound in `uncallable_const`
155
+ --> $DIR/duplicate_err.rs:69:35
156
+ |
157
+ LL | fn uncallable_const(_: impl Trait<ASSOC = 3, ASSOC = 4>) {}
158
+ | ^^^^^^^^^ required by this bound in `uncallable_const`
159
+
160
+ error[E0271]: type mismatch resolving `<() as Trait>::ASSOC == 4`
161
+ --> $DIR/duplicate_err.rs:78:20
162
+ |
163
+ LL | uncallable_rtn(());
164
+ | -------------- ^^ expected `4`, found `3`
165
+ | |
166
+ | required by a bound introduced by this call
167
+ |
168
+ = note: expected constant `4`
169
+ found constant `3`
170
+ note: required by a bound in `uncallable_rtn`
171
+ --> $DIR/duplicate_err.rs:71:75
172
+ |
173
+ LL | fn uncallable_rtn(_: impl Trait<foo(..): Trait<ASSOC = 3>, foo(..): Trait<ASSOC = 4>>) {}
174
+ | ^^^^^^^^^ required by this bound in `uncallable_rtn`
175
+
176
+ error[E0271]: type mismatch resolving `<u32 as Trait>::ASSOC == 3`
177
+ --> $DIR/duplicate_err.rs:79:20
178
+ |
179
+ LL | uncallable_rtn(17u32);
180
+ | -------------- ^^^^^ expected `3`, found `4`
181
+ | |
182
+ | required by a bound introduced by this call
183
+ |
184
+ = note: expected constant `3`
185
+ found constant `4`
186
+ note: required by a bound in `uncallable_rtn`
187
+ --> $DIR/duplicate_err.rs:71:48
188
+ |
189
+ LL | fn uncallable_rtn(_: impl Trait<foo(..): Trait<ASSOC = 3>, foo(..): Trait<ASSOC = 4>>) {}
190
+ | ^^^^^^^^^ required by this bound in `uncallable_rtn`
191
+
192
+ error: aborting due to 17 previous errors
101
193
102
- Some errors have detailed explanations: E0277, E0282.
103
- For more information about an error, try `rustc --explain E0277 `.
194
+ Some errors have detailed explanations: E0271, E0277, E0282.
195
+ For more information about an error, try `rustc --explain E0271 `.
0 commit comments