about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-10-28 04:13:38 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2019-11-07 05:25:31 +0100
commitb189dfe50757f9cc760f898e1ba56b6e836709be (patch)
treec50b2044471c00e094db84981c063343e91f9b84 /src/test
parent1db4d607e7621a7d813743e83125859a47970f79 (diff)
downloadrust-b189dfe50757f9cc760f898e1ba56b6e836709be.tar.gz
rust-b189dfe50757f9cc760f898e1ba56b6e836709be.zip
test that parser is oblivious to set of ABIs
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/parser/extern-abi-syntactic.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/parser/extern-abi-syntactic.rs b/src/test/ui/parser/extern-abi-syntactic.rs
new file mode 100644
index 00000000000..7d2bbfe8a01
--- /dev/null
+++ b/src/test/ui/parser/extern-abi-syntactic.rs
@@ -0,0 +1,17 @@
+// check-pass
+
+// Check that from the grammar's point of view,
+// the specific set of ABIs is not part of it.
+
+fn main() {}
+
+#[cfg(FALSE)]
+extern "some_abi_that_we_are_sure_does_not_exist_semantically" fn foo() {}
+
+#[cfg(FALSE)]
+extern "some_abi_that_we_are_sure_does_not_exist_semantically" {
+    fn foo();
+}
+
+#[cfg(FALSE)]
+type T = extern "some_abi_that_we_are_sure_does_not_exist_semantically" fn();