about summary refs log tree commit diff
path: root/tests/ui-fulldeps/lexer/unicode-version.rs
blob: cd02b952895c917a62def914c8af3ac0f4f81911 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);
}