diff options
| author | Caio <c410.f3r@gmail.com> | 2023-05-08 17:58:01 -0300 |
|---|---|---|
| committer | Caio <c410.f3r@gmail.com> | 2023-05-08 17:58:01 -0300 |
| commit | 02856110968903bf50a32184db200ccd9b6cc8b6 (patch) | |
| tree | 07bd1826387ae6974a86b0cc65b191a93847f8de /tests/ui/cycle-trait | |
| parent | a0111af531178e48375f14f838d7a2298524067c (diff) | |
| download | rust-02856110968903bf50a32184db200ccd9b6cc8b6.tar.gz rust-02856110968903bf50a32184db200ccd9b6cc8b6.zip | |
Move tests
Diffstat (limited to 'tests/ui/cycle-trait')
| -rw-r--r-- | tests/ui/cycle-trait/issue-12511.rs | 8 | ||||
| -rw-r--r-- | tests/ui/cycle-trait/issue-12511.stderr | 23 |
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/ui/cycle-trait/issue-12511.rs b/tests/ui/cycle-trait/issue-12511.rs new file mode 100644 index 00000000000..ea83e3fd9dc --- /dev/null +++ b/tests/ui/cycle-trait/issue-12511.rs @@ -0,0 +1,8 @@ +trait T1 : T2 { +//~^ ERROR cycle detected +} + +trait T2 : T1 { +} + +fn main() { } diff --git a/tests/ui/cycle-trait/issue-12511.stderr b/tests/ui/cycle-trait/issue-12511.stderr new file mode 100644 index 00000000000..558aad10946 --- /dev/null +++ b/tests/ui/cycle-trait/issue-12511.stderr @@ -0,0 +1,23 @@ +error[E0391]: cycle detected when computing the super predicates of `T1` + --> $DIR/issue-12511.rs:1:12 + | +LL | trait T1 : T2 { + | ^^ + | +note: ...which requires computing the super predicates of `T2`... + --> $DIR/issue-12511.rs:5:12 + | +LL | trait T2 : T1 { + | ^^ + = note: ...which again requires computing the super predicates of `T1`, completing the cycle +note: cycle used when collecting item types in top-level module + --> $DIR/issue-12511.rs:1:1 + | +LL | / trait T1 : T2 { +LL | | +LL | | } + | |_^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0391`. |
