]>
Commit | Line | Data |
---|---|---|
c620b35d | 1 | //@ run-pass |
416331ca | 2 | |
0bf4aa26 XL |
3 | #![allow(unused_must_use)] |
4 | #![allow(dead_code)] | |
5bcae85e | 5 | #![allow(path_statements)] |
1a4d82fc | 6 | #![allow(unreachable_code)] |
5bcae85e | 7 | #![allow(unused_variables)] |
781aab86 | 8 | #![feature(if_let_guard)] |
223e47cc | 9 | |
781aab86 FG |
10 | fn id(x: bool) -> bool { |
11 | x | |
12 | } | |
223e47cc LB |
13 | |
14 | fn call_id() { | |
1a4d82fc | 15 | let c = panic!(); |
223e47cc LB |
16 | id(c); |
17 | } | |
18 | ||
781aab86 FG |
19 | fn call_id_2() { |
20 | id(true) && id(return); | |
21 | } | |
223e47cc | 22 | |
781aab86 FG |
23 | fn call_id_3() { |
24 | id(return) && id(return); | |
25 | } | |
223e47cc | 26 | |
223e47cc | 27 | fn ret_guard() { |
85aaf69f | 28 | match 2 { |
223e47cc | 29 | x if (return) => { x; } |
781aab86 | 30 | x if let true = return => { x; } |
223e47cc LB |
31 | _ => {} |
32 | } | |
33 | } | |
34 | ||
35 | pub fn main() {} |