-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Incorrect mismatched-arg-count in rustc #13631
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
Comments
Duplicate of #6975 Curious but why do you have proc-macros disabled on rustc? They should work nowadays |
The comment in my vscode config says "These just make everything way too slow". The extra full check build that is required for proc macros to work just makes quickly editing some parts of rustc too annoying. I have them enabled for my other Rust projects, just not in rustc. |
It's not a full check, we have that RUSTC_WRAPPER hack. But of course, you can disable the diagnostic. |
I assume the wrapper doesn't affect the |
That hack caused quite a few problems in the past so I disabled it (globally). I usually want a check build anyway so I'd rather RA share the results of that with its proc macro support, than go over the code twice (with and without the wrapper). It's just in rustc where even check builds take several minutes that I am looking for ways to cut down startup time. And yeah, no idea if RUSTC_WRAPPER will even have an effect in rustc. |
Have you tried the option to disable cache warming? |
I did, for a bit. Then it seemed like tooltips with type information don't work reliably any more, so I went back to the default. |
Maybe I should try no cache warming + wrapper + proc macros in rustc again one day. But for now, disabling proc macros gets me pretty far and avoids many potential sources of bugs.^^ |
That's shouldn't be the case AFAICT. They might be delayed at times, but still work. I hope Code doesn't time them out. |
Ye that sounds like a bug to me. Fwiw, we hopefully get rid of the wrapper hack in the (near 🤞) future rust-lang/rfcs#3344 |
To reproduce, check out rustc and navigate to this line. RA reports an incorrect-arg-count there, but that is wrong -- the
index
function being called here is defined via a macro here. I have proc macros disabled so I am not surprised it cannot find that type, but it still should not report incorrect diagnostics. The type offield
shows as&{unknown}
, and when a method is called on an unknown type, RA shouldn't assume it knows which method that is and how many arguments it has.The text was updated successfully, but these errors were encountered: