diff options
Diffstat (limited to 'tests/ui/pub/pub-ident-fn-2.rs')
-rw-r--r-- | tests/ui/pub/pub-ident-fn-2.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/pub/pub-ident-fn-2.rs b/tests/ui/pub/pub-ident-fn-2.rs new file mode 100644 index 000000000..e7b86a909 --- /dev/null +++ b/tests/ui/pub/pub-ident-fn-2.rs @@ -0,0 +1,10 @@ +// run-rustfix + +pub foo(_s: usize) { bar() } +//~^ ERROR missing `fn` for function definition + +fn bar() {} + +fn main() { + foo(2); +} |