rust/tests/ui/rfcs/rfc-2294-if-let-guard/bindings.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
202 B
Rust
Raw Normal View History

#![feature(if_let_guard)]
fn main() {
match Some(None) {
Some(x) if let Some(y) = x => (x, y),
_ => y, //~ ERROR cannot find value `y`
}
y //~ ERROR cannot find value `y`
}