File tree 2 files changed +7
-3
lines changed
src/librustc_error_codes/error_codes
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
An attempt was made to retrieve an associated type, but the type was ambiguous.
2
- For example:
2
+
3
+ Erroneous code example:
3
4
4
5
``` compile_fail,E0223
5
6
trait 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:
3
4
4
5
``` compile_fail,E0225
5
6
fn main() {
6
7
let _: Box<dyn std::io::Read + std::io::Write>;
7
8
}
8
9
```
9
10
11
+ Rust does not currently support this.
12
+
10
13
Auto traits such as Send and Sync are an exception to this rule:
11
14
It's possible to have bounds of one non-builtin trait, plus any number of
12
15
auto traits. For example, the following compiles correctly:
You can’t perform that action at this time.
0 commit comments