mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Rollup merge of #69807 - GuillaumeGomez:cleanup-e0391, r=Dylan-DPC
Cleanup E0391 explanation r? @Dylan-DPC
This commit is contained in:
commit
40b405f2d4
@ -1,7 +1,6 @@
|
||||
This error indicates that some types or traits depend on each other
|
||||
and therefore cannot be constructed.
|
||||
A type dependency cycle has been encountered.
|
||||
|
||||
The following example contains a circular dependency between two traits:
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0391
|
||||
trait FirstTrait : SecondTrait {
|
||||
@ -12,3 +11,6 @@ trait SecondTrait : FirstTrait {
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
The previous example contains a circular dependency between two traits:
|
||||
`FirstTrait` depends on `SecondTrait` which itself depends on `FirstTrait`.
|
||||
|
Loading…
Reference in New Issue
Block a user