-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
84 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![feature(non_ascii_idents)] | ||
#![deny(uncommon_codepoints)] | ||
|
||
const µ: f64 = 0.000001; //~ ERROR identifier contains uncommon Unicode codepoints | ||
|
||
fn dijkstra() {} //~ ERROR identifier contains uncommon Unicode codepoints | ||
|
||
fn main() { | ||
let ㇻㇲㇳ = "rust"; //~ ERROR identifier contains uncommon Unicode codepoints | ||
println!("{}", ㇻㇲㇳ); //~ ERROR identifier contains uncommon Unicode codepoints | ||
} |
32 changes: 32 additions & 0 deletions
32
src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
error: identifier contains uncommon Unicode codepoints | ||
--> $DIR/lint-uncommon-codepoints.rs:4:7 | ||
| | ||
LL | const µ: f64 = 0.000001; | ||
| ^ | ||
| | ||
note: lint level defined here | ||
--> $DIR/lint-uncommon-codepoints.rs:2:9 | ||
| | ||
LL | #![deny(uncommon_codepoints)] | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: identifier contains uncommon Unicode codepoints | ||
--> $DIR/lint-uncommon-codepoints.rs:6:4 | ||
| | ||
LL | fn dijkstra() {} | ||
| ^^^^^^^ | ||
|
||
error: identifier contains uncommon Unicode codepoints | ||
--> $DIR/lint-uncommon-codepoints.rs:9:9 | ||
| | ||
LL | let ㇻㇲㇳ = "rust"; | ||
| ^^^^^^ | ||
|
||
error: identifier contains uncommon Unicode codepoints | ||
--> $DIR/lint-uncommon-codepoints.rs:10:20 | ||
| | ||
LL | println!("{}", ㇻㇲㇳ); | ||
| ^^^^^^ | ||
|
||
error: aborting due to 4 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters