-
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
New lint: using #[macro_use]
instead of a use
statement
#5179
Comments
good first issue: just warning on Hard: finding the macros used by the import, and building an auto applicable suggestion. |
One known case is Nevertheless, personally I (and probably other people too) would create a subcrate in the workspace only for the diesel schema, so as not to corrupt my symbol scope with diesel derive macros, and it is obvious not to use this clippy lint in such a schema subcrate. So, this is probably not a critical problem. |
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
Macro use --- changelog: This lint enforces Rust 2018 idiom of importing macro's directly without `#[macro_use]` fixes #5179 .
Macro use --- changelog: This lint enforces Rust 2018 idiom of importing macro's directly without `#[macro_use]` fixes #5179 .
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
Macro use --- changelog: This lint enforces Rust 2018 idiom of importing macro's directly without `#[macro_use]` fixes #5179 .
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
cargo dev update lints fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh warn on macro_use attr (issue rust-lang#5179) fixed suggestion, check edition, ran `tests/ui/update-all-references.sh` fixed failing tests with update-references.sh update-references.sh for missing-doc-impl.rs use if_chain cargo dev fmt
In the Rust 2018 edition, you can directly import exported macros via a normal
use
statement, instead of using the blanket#[macro_use]
attribute. This makes it clear exactly which items you are importing, and avoids the need to useextern crate
.As far as I know, there are no cases where
#[macro_use]
works butuse some_crate::some_macro
doesn't.The text was updated successfully, but these errors were encountered: