about summary refs log tree commit diff
path: root/tests/ui/pub/pub-ident-fn.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pub/pub-ident-fn.rs')
-rw-r--r--tests/ui/pub/pub-ident-fn.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/pub/pub-ident-fn.rs b/tests/ui/pub/pub-ident-fn.rs
new file mode 100644
index 00000000000..2fe4d34fb22
--- /dev/null
+++ b/tests/ui/pub/pub-ident-fn.rs
@@ -0,0 +1,8 @@
+// run-rustfix
+
+pub   foo(_s: usize) -> bool { true }
+//~^ ERROR missing `fn` for function definition
+
+fn main() {
+    foo(2);
+}