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
This commit is contained in:
commit
e22ae2c096
2 changed files with 7 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
||||||
An attempt was made to retrieve an associated type, but the type was ambiguous.
|
An attempt was made to retrieve an associated type, but the type was ambiguous.
|
||||||
For example:
|
|
||||||
|
Erroneous code example:
|
||||||
|
|
||||||
```compile_fail,E0223
|
```compile_fail,E0223
|
||||||
trait MyTrait {type X; }
|
trait MyTrait {type X; }
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
You attempted to use multiple types as bounds for a closure or trait object.
|
Multiple types were used as bounds for a closure or trait object.
|
||||||
Rust does not currently support this. A simple example that causes this error:
|
|
||||||
|
Erroneous code example:
|
||||||
|
|
||||||
```compile_fail,E0225
|
```compile_fail,E0225
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -7,6 +8,8 @@ fn main() {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Rust does not currently support this.
|
||||||
|
|
||||||
Auto traits such as Send and Sync are an exception to this rule:
|
Auto traits such as Send and Sync are an exception to this rule:
|
||||||
It's possible to have bounds of one non-builtin trait, plus any number of
|
It's possible to have bounds of one non-builtin trait, plus any number of
|
||||||
auto traits. For example, the following compiles correctly:
|
auto traits. For example, the following compiles correctly:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue