File tree Expand file tree Collapse file tree 5 files changed +29
-0
lines changed
Expand file tree Collapse file tree 5 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ pub mod unescape;
3333mod tests;
3434
3535use unicode_properties:: UnicodeEmoji ;
36+ pub use unicode_xid:: UNICODE_VERSION as UNICODE_XID_VERSION ;
3637
3738use self :: LiteralKind :: * ;
3839use self :: TokenKind :: * ;
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ use rustc_data_structures::sync::Lrc;
2424use rustc_errors:: { Diag , FatalError , PResult } ;
2525use rustc_session:: parse:: ParseSess ;
2626use rustc_span:: { FileName , SourceFile , Span } ;
27+ pub use unicode_normalization:: UNICODE_VERSION as UNICODE_NORMALIZATION_VERSION ;
2728
2829pub const MACRO_ARGUMENTS : Option < & str > = Some ( "macro arguments" ) ;
2930
Original file line number Diff line number Diff line change 1+ // This test is used to validate which version of Unicode is used for parsing
2+ // identifiers. If the Unicode version changes, it should also be updated in
3+ // the reference at
4+ // https://github.com/rust-lang/reference/blob/HEAD/src/identifiers.md.
5+
6+ //@ run-pass
7+ //@ check-run-results
8+ //@ ignore-cross-compile
9+ //@ reference: ident.unicode
10+ //@ reference: ident.normalization
11+
12+ #![ feature( rustc_private) ]
13+
14+ extern crate rustc_driver;
15+ extern crate rustc_lexer;
16+ extern crate rustc_parse;
17+
18+ fn main ( ) {
19+ println ! ( "Unicode XID version is: {:?}" , rustc_lexer:: UNICODE_XID_VERSION ) ;
20+ println ! ( "Unicode normalization version is: {:?}" , rustc_parse:: UNICODE_NORMALIZATION_VERSION ) ;
21+ }
Original file line number Diff line number Diff line change 1+ Unicode XID version is: (16, 0, 0)
2+ Unicode normalization version is: (16, 0, 0)
Original file line number Diff line number Diff line change @@ -991,6 +991,10 @@ cc = ["@Zalathar"]
991991[mentions ."src/tools/opt-dist" ]
992992cc = [" @kobzol" ]
993993
994+ [mentions ."tests/ui-fulldeps/lexer/unicode-version .run .stdout" ]
995+ message = " Unicode version has changed."
996+ cc = [" @ehuss" ]
997+
994998[assign ]
995999warn_non_default_branch = true
9961000contributing_url = " https://rustc-dev-guide.rust-lang.org/getting-started.html"
You can’t perform that action at this time.
0 commit comments