Add test for nfc-normalization of idents
This commit is contained in:
parent
e22dab387f
commit
adae6aa852
1 changed files with 20 additions and 0 deletions
20
tests/ui/lexer/ident_normalization.rs
Normal file
20
tests/ui/lexer/ident_normalization.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
//@check-pass
|
||||
//@edition:2021
|
||||
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
// Tests that identifiers are NFC-normalized as per
|
||||
// https://rust-lang.github.io/rfcs/2457-non-ascii-idents.html
|
||||
|
||||
// Note that in the first argument of each function `K` is LATIN CAPITAL LETTER K
|
||||
// and in the second it is K (KELVIN SIGN).
|
||||
|
||||
fn ident_nfc<K>(_p1: K, _p2: K) {}
|
||||
|
||||
fn raw_ident_nfc<K>(_p1: r#K, _p2: r#K) {}
|
||||
|
||||
fn lifetime_nfc<'K>(_p1: &'K str, _p2: &'K str) {}
|
||||
|
||||
fn raw_lifetime_nfc<'K>(_p1: &'r#K str, _p2: &'r#K str) {}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue