Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (18 sloc) 385 Bytes
// build-pass (FIXME(62277): could be check-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 => {}
}
}
You can’t perform that action at this time.