Skip to content

Commit df0b0d4

Browse files
committed
Add unicode identifier to weird-exprs
Use unicode identifiers and a unicode emoji in weird-exprs.rs
1 parent 51730fb commit df0b0d4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/ui/weird-exprs.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#![allow(dead_code)]
77
#![allow(unreachable_code)]
88
#![allow(unused_braces, unused_must_use, unused_parens)]
9+
#![allow(uncommon_codepoints, confusable_idents)]
910

1011
#![recursion_limit = "256"]
1112

@@ -164,6 +165,13 @@ fn monkey_barrel() {
164165
assert_eq!(val, ());
165166
}
166167

168+
fn unicode() {
169+
fn 𝚋𝚛𝚎𝚊𝚔() -> char { '🤔' }
170+
assert_eq!(loop {
171+
break 𝚋𝚛𝚎𝚊𝚔 ();
172+
}, '🤔');
173+
}
174+
167175
fn bathroom_stall() {
168176
let mut i = 1;
169177
matches!(2, _|_|_|_|_|_ if (i+=1) != (i+=1));
@@ -189,5 +197,6 @@ pub fn main() {
189197
i_yield();
190198
match_nested_if();
191199
monkey_barrel();
200+
unicode();
192201
bathroom_stall();
193202
}

0 commit comments

Comments
 (0)