Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc is too eager to see macros where there are not #41273

Closed
nox opened this issue Apr 13, 2017 · 1 comment
Closed

rustc is too eager to see macros where there are not #41273

nox opened this issue Apr 13, 2017 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. WG-diagnostics Working group: Diagnostics

Comments

@nox
Copy link
Contributor

nox commented Apr 13, 2017

https://is.gd/TY8WYH

The actual error is a missing fn.

@TimNN TimNN added the A-diagnostics Area: Messages for errors, warnings, and lints label Apr 14, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 26, 2017
@estebank
Copy link
Contributor

Current output:

error: missing `fn` for method definition
 --> src/main.rs:1:4
  |
1 | pub what_macro() {}
  |    ^
help: add `fn` here to parse `what_macro` as a public method
  |
1 | pub fn what_macro() {}
  |     ^^

Fixed in #45997.

@estebank estebank added the WG-diagnostics Working group: Diagnostics label Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. WG-diagnostics Working group: Diagnostics
Projects
None yet
Development

No branches or pull requests

4 participants