Rollup merge of #69346 - GuillaumeGomez:clean-up-e032x-explanations, r=Dylan-DPC
Clean up E0323, E0324, E0325 and E0326 explanations r? @Dylan-DPC
This commit is contained in:
commit
1cb9fb5e16
|
@ -1,4 +1,5 @@
|
|||
An associated const was implemented when another trait item was expected.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0323
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
A method was implemented when another trait item was expected. Erroneous
|
||||
code example:
|
||||
A method was implemented when another trait item was expected.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0324
|
||||
struct Bar;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
An associated type was implemented when another trait item was expected.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0325
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
The types of any associated constants in a trait implementation must match the
|
||||
types in the trait definition. This error indicates that there was a mismatch.
|
||||
An implementation of a trait doesn't match the type contraint.
|
||||
|
||||
Here's an example of this error:
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0326
|
||||
trait Foo {
|
||||
|
@ -14,3 +13,6 @@ impl Foo for Bar {
|
|||
const BAR: u32 = 5; // error, expected bool, found u32
|
||||
}
|
||||
```
|
||||
|
||||
The types of any associated constants in a trait implementation must match the
|
||||
types in the trait definition.
|
||||
|
|
Loading…
Reference in New Issue