Suggest macro call when not sure that it is fn definition

This commit is contained in:
Esteban Küber 2017-11-22 09:49:27 -08:00
parent c82e9e8e1e
commit df357b20be
20 changed files with 33 additions and 37 deletions

View file

@ -3,7 +3,6 @@ error: missing `fn` for method definition
|
11 | pub foo(s: usize) { bar() }
| ^
|
help: add `fn` here to parse `foo` as a public method
|
11 | pub fn foo(s: usize) { bar() }

View file

@ -2,7 +2,7 @@ error: missing `fn` or `struct` for method or struct definition
--> $DIR/pub-ident-fn-or-struct-2.rs:11:4
|
11 | pub S();
| ^
| ---^- help: if you meant to call a macro, write instead: `S!`
error: aborting due to previous error

View file

@ -2,7 +2,7 @@ error: missing `fn` or `struct` for method or struct definition
--> $DIR/pub-ident-fn-or-struct.rs:11:4
|
11 | pub S (foo) bar
| ^
| ---^- help: if you meant to call a macro, write instead: `S!`
error: aborting due to previous error

View file

@ -3,7 +3,6 @@ error: missing `fn` for method definition
|
11 | pub foo(s: usize) -> bool { true }
| ^^^
|
help: add `fn` here to parse `foo` as a public method
|
11 | pub fn foo(s: usize) -> bool { true }

View file

@ -3,7 +3,6 @@ error: missing `struct` for struct definition
|
11 | pub S {
| ^
|
help: add `struct` here to parse `S` as a public struct
|
11 | pub struct S {