about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohannes Oertel <johannes.oertel@uni-due.de>2015-05-02 11:54:51 +0200
committerJohannes Oertel <johannes.oertel@uni-due.de>2015-05-02 15:22:26 +0200
commit846b36833eaf8bf6f8412e2b6b2bdc49d4359803 (patch)
tree83aa1d0ca0d24e02b5384d2b9e2868dd6c9bdd6a
parentd0e594862c5e1044f3e38fa46c23038e95bcfbf3 (diff)
downloadrust-846b36833eaf8bf6f8412e2b6b2bdc49d4359803.tar.gz
rust-846b36833eaf8bf6f8412e2b6b2bdc49d4359803.zip
Add regression test for #12511
Closes #12511.
-rw-r--r--src/test/compile-fail/issue-12511.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-12511.rs b/src/test/compile-fail/issue-12511.rs
new file mode 100644
index 00000000000..35697e68734
--- /dev/null
+++ b/src/test/compile-fail/issue-12511.rs
@@ -0,0 +1,19 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait t1 : t2 {
+//~^ ERROR: unsupported cyclic reference between types/traits detected
+}
+
+trait t2 : t1 {
+//~^ ERROR: unsupported cyclic reference between types/traits detected
+}
+
+fn main() { }