about summary refs log tree commit diff
path: root/tests/ui/rfcs/rfc-2294-if-let-guard/loop-mutability.rs
blob: c13804e4534ea248508cf1afc64636f3dec096dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@ check-pass

#![feature(if_let_guard)]

fn split_last(_: &()) -> Option<(&i32, &i32)> {
    None
}

fn assign_twice() {
    loop {
        match () {
            #[allow(irrefutable_let_patterns)]
            () if let _ = split_last(&()) => {}
            _ => {}
        }
    }
}

fn main() {}