]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2294-if-let-guard/bindings.rs
Add a few basic tests for if-let guards
[rust.git] / src / test / ui / rfc-2294-if-let-guard / bindings.rs
1 #![feature(if_let_guard)]
2 #![allow(incomplete_features)]
3
4 fn main() {
5     match Some(None) {
6         Some(x) if let Some(y) = x => (x, y),
7         _ => y, //~ ERROR cannot find value `y`
8     }
9     y //~ ERROR cannot find value `y`
10 }