-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test to check unicode identifier version
- Loading branch information
Showing
5 changed files
with
40 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// This test is used to validate which version of Unicode is used for parsing | ||
// identifiers. If the Unicode version changes, it should also be updated in | ||
// the reference at | ||
// https://github.com/rust-lang/reference/blob/HEAD/src/identifiers.md. | ||
|
||
//@ run-pass | ||
//@ check-run-results | ||
//@ ignore-cross-compile | ||
//@ reference: ident.unicode | ||
//@ reference: ident.normalization | ||
|
||
#![feature(rustc_private)] | ||
|
||
extern crate rustc_driver; | ||
extern crate rustc_lexer; | ||
extern crate rustc_parse; | ||
|
||
fn main() { | ||
println!("Checking if Unicode version changed."); | ||
println!( | ||
"If the Unicode version changes are intentional, \ | ||
it should also be updated in the reference at \ | ||
https://github.com/rust-lang/reference/blob/HEAD/src/identifiers.md." | ||
); | ||
println!("Unicode XID version is: {:?}", rustc_lexer::UNICODE_XID_VERSION); | ||
println!("Unicode normalization version is: {:?}", rustc_parse::UNICODE_NORMALIZATION_VERSION); | ||
} |
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,4 @@ | ||
Checking if Unicode version changed. | ||
If the Unicode version changes are intentional, it should also be updated in the reference at https://github.com/rust-lang/reference/blob/HEAD/src/identifiers.md. | ||
Unicode XID version is: (16, 0, 0) | ||
Unicode normalization version is: (16, 0, 0) |
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