-
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
Macro use #5230
Macro use #5230
Conversation
I can just turn the Should I mess with the failed test this (as in the error below) should not be there and didn't fail on my machine, its from missing-docs?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI failure is unrelated to this PR, should be fixed by #5231.
I ran the commands the failing tests told be to run |
A quick workaround for 4e18568 is |
I |
Yay finally thanks for the help getting that working @JohnTitor ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I'm not sure we allow to include merge commit here though, it's up to the team. I left a nit point.
Should I squash that commit, or the last three really into one update-reference.sh commit |
Dang sorry I can't seem to get a good test run going they all pass locally this time there were a bunch of ICE errors. The 6 tests that failed did so with
|
It isn't your fault, I can reproduce them on master. Let me take a look. |
4bde11f
to
be6c313
Compare
clippy_lints/src/macro_use.rs
Outdated
then { | ||
let msg = "`macro_use` attribute's are no longer needed in the Rust 2018 edition"; | ||
let help = format!( | ||
"remove the attribute and import the macro directly `use {}::<macro name>`", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this, you should use span_lint_and_sugg
with Applicability::HasPlaceholders
Any idea why this timed out, all the tests seemed to pass? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. Please remove the empty macro_use_import.stdout
file
clippy_lints/src/macro_use.rs
Outdated
/// **Why is this bad?** Since the Rust 2018 edition you can import | ||
/// macro's directly, this is considered idiomatic. | ||
/// | ||
/// **Known problems:** None. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add to the known problems, that the suggestion is not auto-applicable.
Don't worry about the timeout. GHA failed here I guess. (didn't start a new run for the force push, but canceled the prev run because of a new commit) |
Thanks! Impl looks really clean @bors r+ |
📌 Commit 2840f68 has been approved by |
Macro use --- changelog: This lint enforces Rust 2018 idiom of importing macro's directly without `#[macro_use]` fixes #5179 .
💔 Test failed - checks-action_test |
@bors retry |
Macro use --- changelog: This lint enforces Rust 2018 idiom of importing macro's directly without `#[macro_use]` fixes #5179 .
💔 Test failed - checks-action_dev_test |
|
Do I need to pull first, when I ran it it made no changes |
Oh yeah, you need to rebase first probably. |
Thats odd it fails locally but passed in CI? |
You accidentally pushed a binary file in 1601106. Can you remove this please? |
Can you squash some commits please? Then this is good to go. |
@bors r+ Thanks! |
📌 Commit 597e02d has been approved by |
Macro use --- changelog: This lint enforces Rust 2018 idiom of importing macro's directly without `#[macro_use]` fixes #5179 .
💔 Test failed - checks-action_test |
Don't worry about the failure. This is not a issue with Clippy/this PR. |
Thanks for all the help/input on this everyone! |
@bors retry |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Rename macro_use_import -> macro_use_imports I missed this during review of #5230. We can just do this, without deprecating the old name, since this lint didn't hit nightly rustc yet. changelog: none
changelog: This lint enforces Rust 2018 idiom of importing macro's directly without
#[macro_use]
fixes #5179 .