File tree 5 files changed +40
-0
lines changed
5 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ pub mod unescape;
33
33
mod tests;
34
34
35
35
use unicode_properties:: UnicodeEmoji ;
36
+ pub use unicode_xid:: UNICODE_VERSION as UNICODE_XID_VERSION ;
36
37
37
38
use self :: LiteralKind :: * ;
38
39
use self :: TokenKind :: * ;
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ use rustc_data_structures::sync::Lrc;
24
24
use rustc_errors:: { Diag , FatalError , PResult } ;
25
25
use rustc_session:: parse:: ParseSess ;
26
26
use rustc_span:: { FileName , SourceFile , Span } ;
27
+ pub use unicode_normalization:: UNICODE_VERSION as UNICODE_NORMALIZATION_VERSION ;
27
28
28
29
pub const MACRO_ARGUMENTS : Option < & str > = Some ( "macro arguments" ) ;
29
30
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 ! ( "Checking if Unicode version changed." ) ;
20
+ println ! (
21
+ "If the Unicode version changes are intentional, \
22
+ it should also be updated in the reference at \
23
+ https://github.com/rust-lang/reference/blob/HEAD/src/identifiers.md."
24
+ ) ;
25
+ println ! ( "Unicode XID version is: {:?}" , rustc_lexer:: UNICODE_XID_VERSION ) ;
26
+ println ! ( "Unicode normalization version is: {:?}" , rustc_parse:: UNICODE_NORMALIZATION_VERSION ) ;
27
+ }
Original file line number Diff line number Diff line change
1
+ Checking if Unicode version changed.
2
+ 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.
3
+ Unicode XID version is: (16, 0, 0)
4
+ Unicode normalization version is: (16, 0, 0)
Original file line number Diff line number Diff line change @@ -991,6 +991,13 @@ cc = ["@Zalathar"]
991
991
[mentions ."src/tools/opt-dist" ]
992
992
cc = [" @kobzol" ]
993
993
994
+ [mentions ."tests/ui-fulldeps/lexer/unicode-version .run .stdout" ]
995
+ message = """ If the Unicode version changes are intentional,
996
+ it should also be updated in the reference at
997
+ https://github.com/rust-lang/reference/blob/HEAD/src/identifiers.md.
998
+ """
999
+ cc = [" @ehuss" ]
1000
+
994
1001
[assign ]
995
1002
warn_non_default_branch = true
996
1003
contributing_url = " https://rustc-dev-guide.rust-lang.org/getting-started.html"
You can’t perform that action at this time.
0 commit comments