Skip to content

Conversation

zackmdavis
Copy link
Contributor

RFC 2457 declares: "A non_ascii_idents lint is added to the compiler. This lint is allow by default."

(Part of #55467.)

r? @Manishearth

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 16, 2019
impl EarlyLintPass for NonAsciiIdents {
fn check_ident(&mut self, cx: &EarlyContext<'_>, ident: ast::Ident) {
if !ident.name.as_str().is_ascii() {
let mut err = cx.struct_span_lint(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to use let mut err = here; just chain .emit() onto cx.struct_span_lint(...).

@@ -0,0 +1,11 @@
#![feature(non_ascii_idents)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this into a folder under ui/lint/ dedicated to RFC 2457 (since there are more lints to add later...)

@Dylan-DPC-zz
Copy link

merging this:
@bors r=Manishearth

@bors
Copy link
Collaborator

bors commented Jul 1, 2019

📌 Commit 0ae61d8 has been approved by Manishearth

@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 1, 2019
@Dylan-DPC-zz Dylan-DPC-zz dismissed Centril’s stale review July 1, 2019 16:03

the pr doesn't need to block on that. can be fixed in a separate PR

@zackmdavis
Copy link
Contributor Author

Thanks @Dylan-DPC. Although—I was planning to fix it! Sorry I've been so busy lately!
😿

@Centril
Copy link
Contributor

Centril commented Jul 1, 2019

@zackmdavis A follow up would be great. :)

@Dylan-DPC-zz
Copy link

Don't worry. Your lack of time could be a gift for someone waiting for a chance to contribute to the language 😄

Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 2, 2019
…=Manishearth

`non_ascii_idents` lint (part of RFC 2457)

RFC 2457 [declares](https://github.com/rust-lang/rfcs/blob/121bbeff500c3274cea22c7e0ca176274d592646/text/2457-non-ascii-idents.md): "A `non_ascii_idents` lint is added to the compiler. This lint is allow by default."

(Part of rust-lang#55467.)

r? @Manishearth
@bors
Copy link
Collaborator

bors commented Jul 2, 2019

⌛ Testing commit 0ae61d8 with merge ac686e2d827323431587aa79ae6901abba6f1fce...

@bors
Copy link
Collaborator

bors commented Jul 2, 2019

💔 Test failed - checks-azure

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

bors commented Jul 6, 2019

☔ The latest upstream changes (presumably #61988) made this pull request unmergeable. Please resolve the merge conflicts.

RFC 2457 declares: "A `non_ascii_idents` lint is added to the
compiler. This lint is allow by default."
@zackmdavis zackmdavis force-pushed the non_ascii_idents_lint branch from 0ae61d8 to 6de8e39 Compare July 7, 2019 00:23
@zackmdavis
Copy link
Contributor Author

@bors r=Manishearth

@bors
Copy link
Collaborator

bors commented Jul 7, 2019

📌 Commit 6de8e39 has been approved by Manishearth

@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 7, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 7, 2019
…=Manishearth

`non_ascii_idents` lint (part of RFC 2457)

RFC 2457 [declares](https://github.com/rust-lang/rfcs/blob/121bbeff500c3274cea22c7e0ca176274d592646/text/2457-non-ascii-idents.md): "A `non_ascii_idents` lint is added to the compiler. This lint is allow by default."

(Part of rust-lang#55467.)

r? @Manishearth
@bors
Copy link
Collaborator

bors commented Jul 7, 2019

⌛ Testing commit 6de8e39 with merge 0ac1b84af9fd38d43c174a5a1222478cfaa6451e...

Centril added a commit to Centril/rust that referenced this pull request Jul 7, 2019
…=Manishearth

`non_ascii_idents` lint (part of RFC 2457)

RFC 2457 [declares](https://github.com/rust-lang/rfcs/blob/121bbeff500c3274cea22c7e0ca176274d592646/text/2457-non-ascii-idents.md): "A `non_ascii_idents` lint is added to the compiler. This lint is allow by default."

(Part of rust-lang#55467.)

r? @Manishearth
@Centril
Copy link
Contributor

Centril commented Jul 7, 2019

@bors retry rolled up.

bors added a commit that referenced this pull request Jul 7, 2019
Rollup of 4 pull requests

Successful merges:

 - #61883 (`non_ascii_idents` lint (part of RFC 2457))
 - #62042 (Support stability and deprecation checking for all macros)
 - #62213 (rustdoc: set cfg(doctest) when collecting doctests)
 - #62286 (Check if the archive has already been added to avoid duplicates)

Failed merges:

r? @ghost
@bors
Copy link
Collaborator

bors commented Jul 7, 2019

⌛ Testing commit 6de8e39 with merge 9210359...

@bors bors merged commit 6de8e39 into rust-lang:master Jul 7, 2019
@Centril Centril added the F-non_ascii_idents `#![feature(non_ascii_idents)]` label Nov 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-non_ascii_idents `#![feature(non_ascii_idents)]` 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.

6 participants