]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0391.md
Rollup merge of #69762 - RalfJung:validity-errors, r=oli-obk
[rust.git] / src / librustc_error_codes / error_codes / E0391.md
1 A type dependency cycle has been encountered.
2
3 Erroneous code example:
4
5 ```compile_fail,E0391
6 trait FirstTrait : SecondTrait {
7
8 }
9
10 trait SecondTrait : FirstTrait {
11
12 }
13 ```
14
15 The previous example contains a circular dependency between two traits:
16 `FirstTrait` depends on `SecondTrait` which itself depends on `FirstTrait`.