-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Tweak the raw_identifiers lints in 2018 #52722
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
Conversation
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
r? @oli-obk |
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.
Do we need a test for this behaviour?
src/librustc_lint/builtin.rs
Outdated
@@ -1825,6 +1825,10 @@ impl Async2018 { | |||
if cx.sess.parse_sess.raw_identifier_spans.borrow().contains(&span) { | |||
return; | |||
} | |||
// Don't suggest about raw identifiers if the feature isn't active | |||
if !cx.sess.features_untracked().raw_identifiers { | |||
return |
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.
We can still lint, we should just not have a suggestion in that case, but simply a note about choosing a different name.
* Enable the `raw_identifiers` feature automatically in the 2018 preview * Only emit lint warnings if the `raw_identifiers` feature is activated cc rust-lang/cargo#5783
29cd439
to
336cf9d
Compare
Updated! |
@bors r+ |
📌 Commit 336cf9d has been approved by |
Tweak the raw_identifiers lints in 2018 * Enable the `raw_identifiers` feature automatically in the 2018 preview * Only emit lint warnings if the `raw_identifiers` feature is activated cc rust-lang/cargo#5783
☀️ Test successful - status-appveyor, status-travis |
raw_identifiers
feature automatically in the 2018 previewraw_identifiers
feature is activatedcc rust-lang/cargo#5783