File tree 2 files changed +30
-2
lines changed
2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,34 @@ type A3 = fn(i16); // ok!
314
314
```
315
315
"## ,
316
316
317
+ E0567 : r##"
318
+ Generics have been used on an auto trait.
319
+
320
+ Erroneous code example:
321
+
322
+ ```compile_fail,E0567
323
+ #![feature(optin_builtin_traits)]
324
+
325
+ auto trait Generic<T> {} // error!
326
+
327
+ fn main() {}
328
+ ```
329
+
330
+ Since an auto trait is implemented on all existing types, the
331
+ compiler would not be able to infer the types of the trait's generic
332
+ parameters.
333
+
334
+ To fix this issue, just remove the generics:
335
+
336
+ ```
337
+ #![feature(optin_builtin_traits)]
338
+
339
+ auto trait Generic {} // ok!
340
+
341
+ fn main() {}
342
+ ```
343
+ "## ,
344
+
317
345
E0571 : r##"
318
346
A `break` statement with an argument appeared in a non-`loop` loop.
319
347
@@ -531,7 +559,6 @@ Switch to the Rust 2018 edition to use `async fn`.
531
559
;
532
560
E0226 , // only a single explicit lifetime bound is permitted
533
561
E0472 , // asm! is unsupported on this target
534
- E0567 , // auto traits can not have generic parameters
535
562
E0568 , // auto traits can not have super traits
536
563
E0666 , // nested `impl Trait` is illegal
537
564
E0667 , // `impl Trait` in projections
Original file line number Diff line number Diff line change @@ -18,4 +18,5 @@ LL | auto trait MyTrait { fn foo() {} }
18
18
19
19
error: aborting due to 3 previous errors
20
20
21
- For more information about this error, try `rustc --explain E0380`.
21
+ Some errors have detailed explanations: E0380, E0567.
22
+ For more information about an error, try `rustc --explain E0380`.
You can’t perform that action at this time.
0 commit comments