summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/no-const-fn-in-extern-block.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/no-const-fn-in-extern-block.rs')
-rw-r--r--tests/ui/parser/no-const-fn-in-extern-block.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/parser/no-const-fn-in-extern-block.rs b/tests/ui/parser/no-const-fn-in-extern-block.rs
new file mode 100644
index 000000000..1993124ed
--- /dev/null
+++ b/tests/ui/parser/no-const-fn-in-extern-block.rs
@@ -0,0 +1,8 @@
+extern "C" {
+ const fn foo();
+ //~^ ERROR functions in `extern` blocks cannot have qualifiers
+ const unsafe fn bar();
+ //~^ ERROR functions in `extern` blocks cannot have qualifiers
+}
+
+fn main() {}