Skip to content

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

Merged
merged 1 commit into from
Jul 30, 2018

Conversation

alexcrichton
Copy link
Member

  • 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

@rust-highfive
Copy link
Contributor

r? @estebank

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 26, 2018
@alexcrichton
Copy link
Member Author

r? @oli-obk

@rust-highfive rust-highfive assigned oli-obk and unassigned estebank Jul 26, 2018
Copy link
Contributor

@oli-obk oli-obk left a 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?

@@ -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
Copy link
Contributor

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
@alexcrichton alexcrichton force-pushed the more-identifier-lints branch from 29cd439 to 336cf9d Compare July 26, 2018 21:14
@alexcrichton
Copy link
Member Author

Updated!

@oli-obk
Copy link
Contributor

oli-obk commented Jul 30, 2018

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 30, 2018

📌 Commit 336cf9d has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 30, 2018
@bors
Copy link
Collaborator

bors commented Jul 30, 2018

⌛ Testing commit 336cf9d with merge 5ed2b51...

bors added a commit that referenced this pull request Jul 30, 2018
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
@bors
Copy link
Collaborator

bors commented Jul 30, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: oli-obk
Pushing 5ed2b51 to master...

@bors bors merged commit 336cf9d into rust-lang:master Jul 30, 2018
@alexcrichton alexcrichton deleted the more-identifier-lints branch July 31, 2018 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants