blob: 9eed80ad886e0c876a3d14e08031382e7404dec3 [file] [log] [blame]
// compile-pass
// rust-lang/rust#55810: types for a binding in a match arm can be
// inferred from arms that come later in the match.
struct S;
impl S {
fn method(&self) -> bool {
unimplemented!()
}
}
fn get<T>() -> T {
unimplemented!()
}
fn main() {
match get() {
x if x.method() => {}
&S => {}
}
}