Add test for nfc-normalization of idents

This commit is contained in:
Greg Morenz 2025-11-21 14:10:35 -05:00
parent e22dab387f
commit adae6aa852
No known key found for this signature in database
GPG key ID: 87D48B31BFDE6862

View 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 (KELVIN SIGN).
fn ident_nfc<K>(_p1: K, _p2: ) {}
fn raw_ident_nfc<K>(_p1: r#K, _p2: r#) {}
fn lifetime_nfc<'K>(_p1: &'K str, _p2: &' str) {}
fn raw_lifetime_nfc<'K>(_p1: &'r#K str, _p2: &'r# str) {}
fn main() {}