summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0391.md
blob: dff50ccaa0b773bb36ae256315d73e2c67f707af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
A type dependency cycle has been encountered.

Erroneous code example:

```compile_fail,E0391
trait FirstTrait : SecondTrait {

}

trait SecondTrait : FirstTrait {

}
```

The previous example contains a circular dependency between two traits:
`FirstTrait` depends on `SecondTrait` which itself depends on `FirstTrait`.