Skip to content

Commit 1cb9fb5

Browse files
authored
Rollup merge of #69346 - GuillaumeGomez:clean-up-e032x-explanations, r=Dylan-DPC
Clean up E0323, E0324, E0325 and E0326 explanations r? @Dylan-DPC
2 parents 3d9b68a + 8f3fcec commit 1cb9fb5

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

src/librustc_error_codes/error_codes/E0323.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
An associated const was implemented when another trait item was expected.
2+
23
Erroneous code example:
34

45
```compile_fail,E0323

src/librustc_error_codes/error_codes/E0324.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
A method was implemented when another trait item was expected. Erroneous
2-
code example:
1+
A method was implemented when another trait item was expected.
2+
3+
Erroneous code example:
34

45
```compile_fail,E0324
56
struct Bar;

src/librustc_error_codes/error_codes/E0325.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
An associated type was implemented when another trait item was expected.
2+
23
Erroneous code example:
34

45
```compile_fail,E0325

src/librustc_error_codes/error_codes/E0326.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
The types of any associated constants in a trait implementation must match the
2-
types in the trait definition. This error indicates that there was a mismatch.
1+
An implementation of a trait doesn't match the type contraint.
32

4-
Here's an example of this error:
3+
Erroneous code example:
54

65
```compile_fail,E0326
76
trait Foo {
@@ -14,3 +13,6 @@ impl Foo for Bar {
1413
const BAR: u32 = 5; // error, expected bool, found u32
1514
}
1615
```
16+
17+
The types of any associated constants in a trait implementation must match the
18+
types in the trait definition.

0 commit comments

Comments
 (0)