Skip to content

Commit e22ae2c

Browse files
authored
Rollup merge of #68509 - GuillaumeGomez:clean-up-err-codes-e0223-e0225, r=Dylan-DPC
Clean up error codes E0223 and E0225 explanations r? @Dylan-DPC
2 parents cecffb6 + 768f6f9 commit e22ae2c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/librustc_error_codes/error_codes/E0223.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
An 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
56
trait MyTrait {type X; }

src/librustc_error_codes/error_codes/E0225.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
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
56
fn main() {
67
let _: Box<dyn std::io::Read + std::io::Write>;
78
}
89
```
910

11+
Rust does not currently support this.
12+
1013
Auto traits such as Send and Sync are an exception to this rule:
1114
It's possible to have bounds of one non-builtin trait, plus any number of
1215
auto traits. For example, the following compiles correctly:

0 commit comments

Comments
 (0)