about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorCensoredUsername <cens.username@gmail.com>2016-08-27 15:14:51 +0200
committerCensoredUsername <cens.username@gmail.com>2016-08-30 16:03:06 +0200
commit0e58a5d139772404ab936b6c7679e9ff936101c4 (patch)
tree2453b34c80fde922db92e9fb212730d6f5bba2a7 /src/test/compile-fail
parent30c4173cb8f942afbb1588174e5867eb780cdaa0 (diff)
downloadrust-0e58a5d139772404ab936b6c7679e9ff936101c4.tar.gz
rust-0e58a5d139772404ab936b6c7679e9ff936101c4.zip
Feature gate the sysv64 abi as feature(abi_sysv64) and add tests
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/feature-gate-abi-sysv64.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/compile-fail/feature-gate-abi-sysv64.rs b/src/test/compile-fail/feature-gate-abi-sysv64.rs
new file mode 100644
index 00000000000..2a4aae8c06b
--- /dev/null
+++ b/src/test/compile-fail/feature-gate-abi-sysv64.rs
@@ -0,0 +1,19 @@
+// Copyright 2016 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.
+
+// Test that the sysv64 ABI cannot be used when abi-sysv64 feature
+// gate is not used.
+
+extern "sysv64" fn foo() {}
+//~^ ERROR sysv64 ABI is experimental and subject to change
+
+fn main() {
+    foo();
+}