Rollup merge of #96571 - thomcc:bathroom-stall, r=Mark-Simulacrum

Add a bathroom stall to weird expressions test
This commit is contained in:
Yuki Okushi 2022-05-02 10:41:59 +09:00 committed by GitHub
commit f6a89ee628
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -164,6 +164,12 @@ fn monkey_barrel() {
assert_eq!(val, ());
}
fn bathroom_stall() {
let mut i = 1;
matches!(2, _|_|_|_|_|_ if (i+=1) != (i+=1));
assert_eq!(i, 13);
}
pub fn main() {
strange();
funny();
@ -183,4 +189,5 @@ pub fn main() {
i_yield();
match_nested_if();
monkey_barrel();
bathroom_stall();
}