]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #58912 - pnkfelix:issue-58813-incr-comp-regress-test, r=petrochenkov
authorPietro Albini <pietro@pietroalbini.org>
Fri, 8 Mar 2019 08:41:55 +0000 (09:41 +0100)
committerGitHub <noreply@github.com>
Fri, 8 Mar 2019 08:41:55 +0000 (09:41 +0100)
Regression test for #58813

Fix #58813

src/test/incremental/cyclic-trait-hierarchy.rs [new file with mode: 0644]

diff --git a/src/test/incremental/cyclic-trait-hierarchy.rs b/src/test/incremental/cyclic-trait-hierarchy.rs
new file mode 100644 (file)
index 0000000..4102eb3
--- /dev/null
@@ -0,0 +1,14 @@
+// Adapated from rust-lang/rust#58813
+
+// revisions: rpass1 cfail2
+
+#[cfg(rpass1)]
+pub trait T2 { }
+#[cfg(cfail2)]
+pub trait T2: T1 { }
+//[cfail2]~^ ERROR cycle detected when computing the supertraits of `T2`
+//[cfail2]~| ERROR cycle detected when computing the supertraits of `T2`
+
+pub trait T1: T2 { }
+
+fn main() { }