blob: 9cd2003628635b2008e40c6fc3c10af23a61f4ab [file] [log] [blame]
// build-pass (FIXME(62277): could be check-pass?)
#![allow(dead_code)]
struct Foo;
impl Foo {
fn bar(&mut self) -> bool { true }
}
fn error(foo: &mut Foo) {
if let Some(_) = Some(true) {
} else if foo.bar() {}
}
fn ok(foo: &mut Foo) {
if let Some(_) = Some(true) {
} else {
if foo.bar() {}
}
}
fn main() {}