Skip to content

Commit 40b405f

Browse files
authored
Rollup merge of #69807 - GuillaumeGomez:cleanup-e0391, r=Dylan-DPC
Cleanup E0391 explanation r? @Dylan-DPC
2 parents cfb2f95 + 4db15d8 commit 40b405f

File tree

1 file changed

+5
-3
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+5
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
This error indicates that some types or traits depend on each other
2-
and therefore cannot be constructed.
1+
A type dependency cycle has been encountered.
32

4-
The following example contains a circular dependency between two traits:
3+
Erroneous code example:
54

65
```compile_fail,E0391
76
trait FirstTrait : SecondTrait {
@@ -12,3 +11,6 @@ trait SecondTrait : FirstTrait {
1211
1312
}
1413
```
14+
15+
The previous example contains a circular dependency between two traits:
16+
`FirstTrait` depends on `SecondTrait` which itself depends on `FirstTrait`.

0 commit comments

Comments
 (0)