rust/tests/ui/lexer/ident_normalization.rs
2025-11-21 14:22:54 -05:00

20 lines
516 B
Rust
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//@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() {}