-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
typos inside cfg macros go undetected #5051
Comments
Only the "enabled" code is being checked by rustc. You should get what you expect by pressing |
I apologize for not phrasing the issue well.. I am aware that only the enabled code is checked by rustc. |
A lint with a whitelist of possible configurations would be possible. The problem is, that you can pass anything as a config through |
@flip1995 I see.. Can we keep this issue open for a bit to get others' feedback also? I'm curious how others would think of this issue 😃 |
I'd say, have Clippy produce a warning if there's a high similarity. So if Same with say |
We already do something similar with |
The below program has typos inside the
cfg
macro call.(
feeture
instead offeature
)The below program compiles without any errors, and
clippy
also does not print any warnings.cfg
macro seems to be a compiler built-in macro (source code not available?).I found this issue while debugging my Rust code.
The text was updated successfully, but these errors were encountered: