Skip to content

Commit 35ae48c

Browse files
authored
Rollup merge of #69457 - GuillaumeGomez:clean-up-e0370-e0371, r=Dylan-DPC
Clean up e0370 e0371 r? @Dylan-DPC
2 parents ab3fb8b + d6f83c5 commit 35ae48c

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/librustc_error_codes/error_codes/E0370.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
The maximum value of an enum was reached, so it cannot be automatically
2-
set in the next enum value. Erroneous code example:
2+
set in the next enum value.
3+
4+
Erroneous code example:
35

46
```compile_fail,E0370
57
#[repr(i64)]
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
When `Trait2` is a subtrait of `Trait1` (for example, when `Trait2` has a
2-
definition like `trait Trait2: Trait1 { ... }`), it is not allowed to implement
3-
`Trait1` for `Trait2`. This is because `Trait2` already implements `Trait1` by
4-
definition, so it is not useful to do this.
1+
A trait was implemented on another which already automatically implemented it.
52

6-
Example:
3+
Erroneous code examples:
74

85
```compile_fail,E0371
96
trait Foo { fn foo(&self) { } }
@@ -15,3 +12,8 @@ impl Foo for Baz { } // error, `Baz` implements `Bar` which implements `Foo`
1512
impl Baz for Baz { } // error, `Baz` (trivially) implements `Baz`
1613
impl Baz for Bar { } // Note: This is OK
1714
```
15+
16+
When `Trait2` is a subtrait of `Trait1` (for example, when `Trait2` has a
17+
definition like `trait Trait2: Trait1 { ... }`), it is not allowed to implement
18+
`Trait1` for `Trait2`. This is because `Trait2` already implements `Trait1` by
19+
definition, so it is not useful to do this.

0 commit comments

Comments
 (0)