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

17 lines
182 B
Rust

//@ check-pass
#![feature(if_let_guard)]
struct S;
fn get<T>() -> Option<T> {
None
}
fn main() {
match get() {
x if let Some(S) = x => {}
_ => {}
}
}