]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0568.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0568.md
1 A super trait has been added to an auto trait.
2
3 Erroneous code example:
4
5 ```compile_fail,E0568
6 #![feature(auto_traits)]
7
8 auto trait Bound : Copy {} // error!
9
10 fn main() {}
11 ```
12
13 Since an auto trait is implemented on all existing types, adding a super trait
14 would filter out a lot of those types. In the current example, almost none of
15 all the existing types could implement `Bound` because very few of them have the
16 `Copy` trait.
17
18 To fix this issue, just remove the super trait:
19
20 ```
21 #![feature(auto_traits)]
22
23 auto trait Bound {} // ok!
24
25 fn main() {}
26 ```