summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/issue-87694-misplaced-pub.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/issue-87694-misplaced-pub.rs')
-rw-r--r--tests/ui/parser/issue-87694-misplaced-pub.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/parser/issue-87694-misplaced-pub.rs b/tests/ui/parser/issue-87694-misplaced-pub.rs
new file mode 100644
index 000000000..3f824617c
--- /dev/null
+++ b/tests/ui/parser/issue-87694-misplaced-pub.rs
@@ -0,0 +1,5 @@
+const pub fn test() {}
+//~^ ERROR expected one of `async`, `extern`, `fn`, or `unsafe`, found keyword `pub`
+//~| NOTE expected one of `async`, `extern`, `fn`, or `unsafe`
+//~| HELP visibility `pub` must come before `const`
+//~| SUGGESTION pub const