-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Lint async
identifiers in 2018 preparation mode
#52375
Lint async
identifiers in 2018 preparation mode
#52375
Conversation
This comment has been minimized.
This comment has been minimized.
d2d85d5
to
6cd25b1
Compare
This comment has been minimized.
This comment has been minimized.
6cd25b1
to
15a8a66
Compare
Thanks for the PR @oli-obk! Since using Also, could the test be expanded to cover cases like: trait async {}
struct async {}
let async: async = async {};
static async: u32 = 0;
const async: u32 = 0;
impl async for MyStruct {}
impl Foo { fn async() {} } |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
src/librustc_lint/builtin.rs
Outdated
|
||
declare_lint! { | ||
pub ASYNC_IDENTS, | ||
Deny, |
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.
Just to confirm, but the Deny
here was for tests?
For the other 2018 lints at least they're all set to Allow
by default and they're only active with the lint group turned on (which rustfix does automatically)
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.
I just followed what another 2018 incompat lint did, and that was deny
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.
E.g.
rust/src/librustc/lint/builtin.rs
Line 302 in 68c39b9
pub DUPLICATE_MACRO_EXPORTS, |
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.
Aha, that's not a 2018 lint I think because that's changing for the 2015 edition, I was thinking of lints like this one --
rust/src/librustc/lint/builtin.rs
Lines 264 to 269 in 68c39b9
declare_lint! { | |
pub ABSOLUTE_PATHS_NOT_STARTING_WITH_CRATE, | |
Allow, | |
"fully qualified paths that start with a module name \ | |
instead of `crate`, `self`, or an extern crate 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.
Then this is wrong:
Lines 213 to 216 in 254f879
FutureIncompatibleInfo { | |
id: LintId::of(DUPLICATE_MACRO_EXPORTS), | |
reference: "issue #35896 <https://github.com/rust-lang/rust/issues/35896>", | |
edition: Some(Edition::Edition2018), |
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.
Ah I believe so! Want to file an issue for that?
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.
edition lints can be any level they wish to be, that one probably makes more sense as deny, but this one should be allow
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
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.
r=me with deny replaced with allow
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.
r=me with deny replacd with allow
d9280b2
to
3fb907f
Compare
@bors r=Manishearth |
📌 Commit 3fb907f49d3d6864b0d138870b86b5c5116354c9 has been approved by |
This comment has been minimized.
This comment has been minimized.
3fb907f
to
68c93e7
Compare
@bors r=Manishearth |
📌 Commit 68c93e7 has been approved by |
@bors p=332 |
…anishearth Lint `async` identifiers in 2018 preparation mode r? @Manishearth fixes #49716
☀️ Test successful - status-appveyor, status-travis |
r? @Manishearth
fixes #49716