-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Excess semicolon lint produces wrong diagnostics with async main and derive macro #63947
Comments
It is the macro's responsibility to preserve spans. What we can do is silence warnings coming from macro's, but we do that on a lint by lint basis at the moment. |
Without the excess semicolon the spans for the other warnings are correct even with the macro, which led me to believe that the macro itself is not the problem. Does that mean that the macro somehow needs to support this new lint (or some family of lints)? |
The fact that the other lints trigger only if the extra semicolon is there is quite weird indeed. |
At my setup they trigger always (unless the compiler does not nothing and prints nothing out), however the combination |
…rkor Fix redundant semicolon lint interaction with proc macro attributes Fixes rust-lang#63967 and fixes rust-lang#63947, both of which were caused by the lint's changes to the parser interacting poorly with proc macro attributes and causing span information to be lost r? @varkor
…rkor Fix redundant semicolon lint interaction with proc macro attributes Fixes rust-lang#63967 and fixes rust-lang#63947, both of which were caused by the lint's changes to the parser interacting poorly with proc macro attributes and causing span information to be lost r? @varkor
…rkor Fix redundant semicolon lint interaction with proc macro attributes Fixes rust-lang#63967 and fixes rust-lang#63947, both of which were caused by the lint's changes to the parser interacting poorly with proc macro attributes and causing span information to be lost r? @varkor
…rkor Fix redundant semicolon lint interaction with proc macro attributes Fixes rust-lang#63967 and fixes rust-lang#63947, both of which were caused by the lint's changes to the parser interacting poorly with proc macro attributes and causing span information to be lost r? @varkor
…rkor Fix redundant semicolon lint interaction with proc macro attributes Fixes rust-lang#63967 and fixes rust-lang#63947, both of which were caused by the lint's changes to the parser interacting poorly with proc macro attributes and causing span information to be lost r? @varkor
The new lint for excess semicolons (#62984) has some weird behaviour when the lint is triggered inside an async function that is transformed using a procedural macro.
Rustc version: 1.39.0-nightly (9b91b9c 2019-08-26)
Compiling this:
gives this output:
note how the spans are all targeting the procedural macro instead of the correct line.
If I remove the procedural macro or if I remove the excess semicolon, the spans are fine. This leads me to believe that it's an error in the lint, not in the macro, but maybe I'm wrong.
The text was updated successfully, but these errors were encountered: