]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-41272.rs
Enable full revision in const generics ui tests
[rust.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() {}