]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0391.md
Rollup merge of #103842 - andrewpollack:add-fuchsia-test-script, r=tmandry
[rust.git] / compiler / rustc_error_codes / src / 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`.