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