2019-07-27 05:54:25 +08:00
|
|
|
//@ run-pass
|
|
|
|
|
2018-09-14 18:20:28 +08:00
|
|
|
#![allow(unused_must_use)]
|
|
|
|
#![allow(dead_code)]
|
2016-08-13 17:41:43 +08:00
|
|
|
#![allow(path_statements)]
|
2014-04-14 23:30:31 +08:00
|
|
|
#![allow(unreachable_code)]
|
2016-08-13 17:41:43 +08:00
|
|
|
#![allow(unused_variables)]
|
2023-09-18 23:18:51 +08:00
|
|
|
#![feature(if_let_guard)]
|
2012-07-27 05:47:05 +08:00
|
|
|
|
2023-09-18 23:18:51 +08:00
|
|
|
fn id(x: bool) -> bool {
|
|
|
|
x
|
|
|
|
}
|
2012-07-27 05:47:05 +08:00
|
|
|
|
|
|
|
fn call_id() {
|
2014-10-10 03:17:22 +08:00
|
|
|
let c = panic!();
|
2012-07-27 05:47:05 +08:00
|
|
|
id(c);
|
|
|
|
}
|
|
|
|
|
2023-09-18 23:18:51 +08:00
|
|
|
fn call_id_2() {
|
|
|
|
id(true) && id(return);
|
|
|
|
}
|
2012-07-27 05:47:05 +08:00
|
|
|
|
2023-09-18 23:18:51 +08:00
|
|
|
fn call_id_3() {
|
|
|
|
id(return) && id(return);
|
|
|
|
}
|
2012-07-27 05:47:05 +08:00
|
|
|
|
|
|
|
fn ret_guard() {
|
2015-01-26 05:05:03 +08:00
|
|
|
match 2 {
|
2012-08-04 10:59:04 +08:00
|
|
|
x if (return) => { x; }
|
2023-09-18 23:18:51 +08:00
|
|
|
x if let true = return => { x; }
|
2012-08-04 10:59:04 +08:00
|
|
|
_ => {}
|
2012-07-27 05:47:05 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-02 11:43:17 +08:00
|
|
|
pub fn main() {}
|