File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 11An attempt was made to retrieve an associated type, but the type was ambiguous.
2- For example:
2+
3+ Erroneous code example:
34
45``` compile_fail,E0223
56trait MyTrait {type X; }
Original file line number Diff line number Diff line change 1- You attempted to use multiple types as bounds for a closure or trait object.
2- Rust does not currently support this. A simple example that causes this error:
1+ Multiple types were used as bounds for a closure or trait object.
2+
3+ Erroneous code example:
34
45``` compile_fail,E0225
56fn main() {
67 let _: Box<dyn std::io::Read + std::io::Write>;
78}
89```
910
11+ Rust does not currently support this.
12+
1013Auto traits such as Send and Sync are an exception to this rule:
1114It's possible to have bounds of one non-builtin trait, plus any number of
1215auto traits. For example, the following compiles correctly:
You can’t perform that action at this time.
0 commit comments