]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/unreachable-code.rs
Auto merge of #61421 - vorner:string-in-rc-into-raw-docs, r=RalfJung
[rust.git] / src / test / run-pass / unreachable-code.rs
1 #![allow(unused_must_use)]
2 #![allow(dead_code)]
3
4 #![allow(path_statements)]
5 #![allow(unreachable_code)]
6 #![allow(unused_variables)]
7
8 fn id(x: bool) -> bool { x }
9
10 fn call_id() {
11     let c = panic!();
12     id(c);
13 }
14
15 fn call_id_2() { id(true) && id(return); }
16
17 fn call_id_3() { id(return) && id(return); }
18
19 fn ret_guard() {
20     match 2 {
21       x if (return) => { x; }
22       _ => {}
23     }
24 }
25
26 pub fn main() {}