about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2018-03-19 00:26:41 -0500
committerTyler Mandry <tmandry@gmail.com>2018-03-19 00:26:41 -0500
commitc5c650d670f5f191ea9667b455c15a607e550fdb (patch)
tree7c171b7468a5286cabe79641f3af211e9118a68c /src/test
parentc2f4744d2db4e162df824d0bd0b093ba4b351545 (diff)
downloadrust-c5c650d670f5f191ea9667b455c15a607e550fdb.tar.gz
rust-c5c650d670f5f191ea9667b455c15a607e550fdb.zip
Split out termination_trait_test feature gate
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/feature-gate-termination_trait_test.rs22
-rw-r--r--src/test/run-pass/rfc-1937-termination-trait/termination-trait-in-test.rs2
2 files changed, 23 insertions, 1 deletions
diff --git a/src/test/compile-fail/feature-gate-termination_trait_test.rs b/src/test/compile-fail/feature-gate-termination_trait_test.rs
new file mode 100644
index 00000000000..4af7e946716
--- /dev/null
+++ b/src/test/compile-fail/feature-gate-termination_trait_test.rs
@@ -0,0 +1,22 @@
+// 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.
+
+// compile-flags: --test
+
+fn main() {}
+
+#[cfg(test)]
+mod tests {
+    #[test]
+    fn it_works() -> Result<(), ()> {
+    //~^ ERROR functions used as tests must have signature fn() -> ()
+        Ok(())
+    }
+}
diff --git a/src/test/run-pass/rfc-1937-termination-trait/termination-trait-in-test.rs b/src/test/run-pass/rfc-1937-termination-trait/termination-trait-in-test.rs
index 494500d522a..11997eb6917 100644
--- a/src/test/run-pass/rfc-1937-termination-trait/termination-trait-in-test.rs
+++ b/src/test/run-pass/rfc-1937-termination-trait/termination-trait-in-test.rs
@@ -10,7 +10,7 @@
 
 // compile-flags: --test
 
-#![feature(termination_trait)]
+#![feature(termination_trait_test)]
 #![feature(test)]
 
 extern crate test;