]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-41272.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / issues / issue-41272.rs
1 // check-pass
2 #![allow(dead_code)]
3 struct Foo;
4
5 impl Foo {
6 fn bar(&mut self) -> bool { true }
7 }
8
9 fn error(foo: &mut Foo) {
10 if let Some(_) = Some(true) {
11 } else if foo.bar() {}
12 }
13
14 fn ok(foo: &mut Foo) {
15 if let Some(_) = Some(true) {
16 } else {
17 if foo.bar() {}
18 }
19 }
20
21 fn main() {}