about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-04-28 04:31:27 +0000
committerbors <bors@rust-lang.org>2017-04-28 04:31:27 +0000
commitace517da0d1e356aa5b42f4cdee6854538591ef2 (patch)
tree9ed83d9cf54dcc965f0f62e288c7f9b3322bbec4 /src/test
parent70baf4f13ec70cb17942704849b0f3c047ad347b (diff)
parentd21c9b921d9a26d8d697f3e4fbe7ff99ed3b1ed3 (diff)
downloadrust-ace517da0d1e356aa5b42f4cdee6854538591ef2.tar.gz
rust-ace517da0d1e356aa5b42f4cdee6854538591ef2.zip
Auto merge of #41598 - frewsxcv:rollup, r=frewsxcv
Rollup of 4 pull requests

- Successful merges: #41534, #41546, #41571, #41583
- Failed merges:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/auxiliary/issue_41549.rs15
-rw-r--r--src/test/compile-fail/issue-41549.rs23
2 files changed, 38 insertions, 0 deletions
diff --git a/src/test/compile-fail/auxiliary/issue_41549.rs b/src/test/compile-fail/auxiliary/issue_41549.rs
new file mode 100644
index 00000000000..77b203997b4
--- /dev/null
+++ b/src/test/compile-fail/auxiliary/issue_41549.rs
@@ -0,0 +1,15 @@
+// Copyright 2017 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.
+
+#![feature(associated_consts)]
+
+pub trait Trait {
+    const CONST: u32;
+}
diff --git a/src/test/compile-fail/issue-41549.rs b/src/test/compile-fail/issue-41549.rs
new file mode 100644
index 00000000000..c4aab4bcabf
--- /dev/null
+++ b/src/test/compile-fail/issue-41549.rs
@@ -0,0 +1,23 @@
+// Copyright 2017 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.
+
+// aux-build:issue_41549.rs
+
+#![feature(associated_consts)]
+
+extern crate issue_41549;
+
+struct S;
+
+impl issue_41549::Trait for S {
+    const CONST: () = (); //~ ERROR incompatible type for trait
+}
+
+fn main() {}