-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Match assumes extern statics stay the same forever #8694
Comments
This is not (necessarily) too eager. You are expected to recompile if |
This is working as intended. Changing a static is like changing a This would fall under the purview of a project like rustpkg, but there is currently no form of dependency management between crates. Due to working as intended, I'm closing this issue. It's well understood that dependency management is not ideal today, but I don't think that this is the right issue to track that in. |
More proc-macro detection fixes rust-lang#6514 fixes rust-lang#8683 fixes rust-lang#6858 fixes rust-lang#6594 This is a more general way of checking if an expression comes from a macro and could be trivially applied to other lints. Ideally this would be fixed in rustc's proc-macro api, but I don't see that happening any time soon. changelog: FPs: [`unit_arg`] [`default_trait_access`] [`missing_docs_in_private_items`]: No longer trigger in code generated from proc-macros.
Use `check_proc_macro` for `missing_const_for_fn` This uses `@Jarcho's` rust-lang#8694 implementation to fix `missing_const_for_fn` linting in proc-macros. I'm not 100% sure what I'm doing here, any feedback is appreciated. Previously: Jarcho/rust-clippy#1. Fixes rust-lang#8854. changelog: [`missing_const_for_fn`]: No longer lints in proc-macros
The code:
produces the expected output:
Foo == Foo
But after changing
aux.rs
toand recompiling only
aux.rs
, the output isFoo != Foo
This is because
rustc
is too eager and replaces the match patternaux::Foo
with1
at compile-time. That works until we changeaux::Foo
. Becausex
gets its value at runtime, it becomes2
and doesn't fit the first match arm.The text was updated successfully, but these errors were encountered: