File tree 1 file changed +29
-1
lines changed
1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -359,6 +359,35 @@ fn main() {}
359
359
```
360
360
"## ,
361
361
362
+ E0568 : r##"
363
+ A super trait has been added to an auto trait.
364
+
365
+ Erroneous code example:
366
+
367
+ ```compile_fail,E0568
368
+ #![feature(optin_builtin_traits)]
369
+
370
+ auto trait Bound : Copy {} // error!
371
+
372
+ fn main() {}
373
+ ```
374
+
375
+ Since an auto trait is implemented on all existing types, adding a super trait
376
+ would filter out a lot of those types. In the current example, almost none of
377
+ all the existing types could implement `Bound` because very few of them have the
378
+ `Copy` trait.
379
+
380
+ To fix this issue, just remove the super trait:
381
+
382
+ ```
383
+ #![feature(optin_builtin_traits)]
384
+
385
+ auto trait Bound {} // ok!
386
+
387
+ fn main() {}
388
+ ```
389
+ "## ,
390
+
362
391
E0571 : r##"
363
392
A `break` statement with an argument appeared in a non-`loop` loop.
364
393
@@ -576,7 +605,6 @@ Switch to the Rust 2018 edition to use `async fn`.
576
605
;
577
606
E0226 , // only a single explicit lifetime bound is permitted
578
607
E0472 , // asm! is unsupported on this target
579
- E0568 , // auto traits can not have super traits
580
608
E0666 , // nested `impl Trait` is illegal
581
609
E0667 , // `impl Trait` in projections
582
610
E0696 , // `continue` pointing to a labeled block
You can’t perform that action at this time.
0 commit comments