File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
branches/try/src/librustc_typeck Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
3
3
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4
- refs/heads/try: 00e115d090180c9fe13856500576978ff3007cda
4
+ refs/heads/try: 04888e7c600fed71d989937cc8f582bea83423a2
5
5
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
6
6
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
7
7
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -211,6 +211,40 @@ Reference:
211
211
http://doc.rust-lang.org/reference.html#trait-objects
212
212
"## ,
213
213
214
+ E0035 : r##"
215
+ You tried to give a type parameter where it wasn't needed. Bad example:
216
+
217
+ ```
218
+ struct Test;
219
+
220
+ impl Test {
221
+ fn method(&self) {}
222
+ }
223
+
224
+ fn main() {
225
+ let x = Test;
226
+
227
+ x.method::<i32>(); // Error: Test::method doesn't need type parameter!
228
+ }
229
+ ```
230
+
231
+ To fix this error, just remove the type parameter:
232
+
233
+ ```
234
+ struct Test;
235
+
236
+ impl Test {
237
+ fn method(&self) {}
238
+ }
239
+
240
+ fn main() {
241
+ let x = Test;
242
+
243
+ x.method(); // OK, we're good!
244
+ }
245
+ ```
246
+ "## ,
247
+
214
248
E0036 : r##"
215
249
This error occurrs when you pass too many or not enough type parameters to
216
250
a method. Example:
You can’t perform that action at this time.
0 commit comments