2024-02-22 12:10:29 +00:00
|
|
|
//@ pp-exact
|
2015-11-03 16:39:51 +00:00
|
|
|
|
2022-03-16 00:20:21 +00:00
|
|
|
#![feature(inline_const)]
|
|
|
|
#![feature(inline_const_pat)]
|
2019-06-08 08:36:43 +00:00
|
|
|
#![feature(rustc_attrs)]
|
2015-11-24 13:56:20 +00:00
|
|
|
#![feature(stmt_expr_attributes)]
|
2015-11-03 16:39:51 +00:00
|
|
|
|
2021-12-01 19:45:14 +00:00
|
|
|
fn main() {}
|
2015-11-03 16:39:51 +00:00
|
|
|
|
|
|
|
fn _0() {
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2015-11-03 16:39:51 +00:00
|
|
|
foo();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn _1() {
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2015-11-03 16:39:51 +00:00
|
|
|
unsafe {
|
2022-03-16 00:20:21 +00:00
|
|
|
#![rustc_dummy]
|
2015-11-03 16:39:51 +00:00
|
|
|
// code
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn _2() {
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2015-11-03 16:39:51 +00:00
|
|
|
{ foo(); }
|
|
|
|
|
|
|
|
{
|
2019-06-08 08:36:43 +00:00
|
|
|
#![rustc_dummy]
|
2015-11-03 16:39:51 +00:00
|
|
|
|
|
|
|
foo()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn _3() {
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2021-12-01 19:45:14 +00:00
|
|
|
match () { _ => {} }
|
2015-11-03 16:39:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn _4() {
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2021-05-11 19:21:54 +00:00
|
|
|
match () {
|
|
|
|
#![rustc_dummy]
|
|
|
|
_ => (),
|
|
|
|
}
|
2015-11-03 16:39:51 +00:00
|
|
|
|
2021-05-11 19:21:54 +00:00
|
|
|
let _ =
|
|
|
|
#[rustc_dummy] match () {
|
2022-01-21 09:34:06 +00:00
|
|
|
#![rustc_dummy]
|
|
|
|
() => (),
|
|
|
|
};
|
2015-11-03 16:39:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn _5() {
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2015-11-03 16:39:51 +00:00
|
|
|
let x = 1;
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
let x = #[rustc_dummy] 1;
|
2015-11-03 16:39:51 +00:00
|
|
|
|
|
|
|
let y = ();
|
|
|
|
let z = ();
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
foo3(x, #[rustc_dummy] y, z);
|
2015-11-03 16:39:51 +00:00
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
qux(3 + #[rustc_dummy] 2);
|
2015-11-03 16:39:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn _6() {
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2021-03-19 23:52:07 +00:00
|
|
|
[1, 2, 3];
|
2015-11-03 16:39:51 +00:00
|
|
|
|
2021-03-19 23:52:07 +00:00
|
|
|
let _ = #[rustc_dummy] [1, 2, 3];
|
2015-11-03 16:39:51 +00:00
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2021-03-19 23:52:07 +00:00
|
|
|
[1; 4];
|
2015-11-03 16:39:51 +00:00
|
|
|
|
2021-03-19 23:52:07 +00:00
|
|
|
let _ = #[rustc_dummy] [1; 4];
|
2015-11-03 16:39:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
struct Foo {
|
|
|
|
data: (),
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Bar(());
|
|
|
|
|
|
|
|
fn _7() {
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2022-01-22 02:10:12 +00:00
|
|
|
Foo { data: () };
|
2015-11-03 16:39:51 +00:00
|
|
|
|
2022-01-22 02:10:12 +00:00
|
|
|
let _ = #[rustc_dummy] Foo { data: () };
|
2015-11-03 16:39:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn _8() {
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2021-03-19 23:52:07 +00:00
|
|
|
();
|
2015-11-03 16:39:51 +00:00
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2021-03-19 23:52:07 +00:00
|
|
|
(0);
|
2015-11-03 16:39:51 +00:00
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2021-03-19 23:52:07 +00:00
|
|
|
(0,);
|
2015-11-03 16:39:51 +00:00
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2021-03-19 23:52:07 +00:00
|
|
|
(0, 1);
|
2015-11-03 16:39:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn _9() {
|
2023-11-10 03:34:56 +00:00
|
|
|
macro_rules! stmt_mac { () => { let _ = (); } }
|
2015-11-03 16:39:51 +00:00
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2015-11-03 16:39:51 +00:00
|
|
|
stmt_mac!();
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2021-12-01 19:45:14 +00:00
|
|
|
stmt_mac! {};
|
2015-11-03 16:39:51 +00:00
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2015-11-03 16:39:51 +00:00
|
|
|
stmt_mac![];
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2021-12-01 19:45:14 +00:00
|
|
|
stmt_mac! {}
|
2015-11-03 16:39:51 +00:00
|
|
|
|
|
|
|
let _ = ();
|
|
|
|
}
|
|
|
|
|
2019-07-13 21:11:59 +00:00
|
|
|
macro_rules! expr_mac { () => { () } }
|
2015-11-03 16:39:51 +00:00
|
|
|
|
|
|
|
fn _10() {
|
2019-06-08 08:36:43 +00:00
|
|
|
let _ = #[rustc_dummy] expr_mac!();
|
|
|
|
let _ = #[rustc_dummy] expr_mac![];
|
2021-12-01 19:45:14 +00:00
|
|
|
let _ = #[rustc_dummy] expr_mac! {};
|
2015-11-03 16:39:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn _11() {
|
2021-03-19 23:52:07 +00:00
|
|
|
let _: [(); 0] = #[rustc_dummy] [];
|
|
|
|
let _ = #[rustc_dummy] [0, 0];
|
|
|
|
let _ = #[rustc_dummy] [0; 0];
|
2019-06-08 08:36:43 +00:00
|
|
|
let _ = #[rustc_dummy] foo();
|
|
|
|
let _ = #[rustc_dummy] 1i32.clone();
|
2021-03-19 23:52:07 +00:00
|
|
|
let _ = #[rustc_dummy] ();
|
|
|
|
let _ = #[rustc_dummy] (0);
|
|
|
|
let _ = #[rustc_dummy] (0,);
|
|
|
|
let _ = #[rustc_dummy] (0, 0);
|
2019-06-08 08:36:43 +00:00
|
|
|
let _ = #[rustc_dummy] 0 + #[rustc_dummy] 0;
|
|
|
|
let _ = #[rustc_dummy] !0;
|
|
|
|
let _ = #[rustc_dummy] -0i32;
|
|
|
|
let _ = #[rustc_dummy] false;
|
|
|
|
let _ = #[rustc_dummy] 'c';
|
|
|
|
let _ = #[rustc_dummy] 0;
|
|
|
|
let _ = #[rustc_dummy] 0 as usize;
|
2015-11-03 16:39:51 +00:00
|
|
|
let _ =
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy] while false {
|
2022-01-21 09:34:06 +00:00
|
|
|
#![rustc_dummy]
|
|
|
|
};
|
2015-11-03 16:39:51 +00:00
|
|
|
let _ =
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy] while let None = Some(()) {
|
2022-01-21 09:34:06 +00:00
|
|
|
#![rustc_dummy]
|
|
|
|
};
|
2015-11-03 16:39:51 +00:00
|
|
|
let _ =
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy] for _ in 0..0 {
|
2022-01-21 09:34:06 +00:00
|
|
|
#![rustc_dummy]
|
|
|
|
};
|
2015-11-03 16:39:51 +00:00
|
|
|
let _ =
|
2021-06-16 10:25:00 +00:00
|
|
|
#[rustc_dummy] loop {
|
2022-01-21 09:34:06 +00:00
|
|
|
#![rustc_dummy]
|
|
|
|
};
|
2021-05-11 19:21:54 +00:00
|
|
|
let _ =
|
|
|
|
#[rustc_dummy] match false {
|
2022-01-21 09:34:06 +00:00
|
|
|
#![rustc_dummy]
|
|
|
|
_ => (),
|
|
|
|
};
|
2019-06-08 08:36:43 +00:00
|
|
|
let _ = #[rustc_dummy] || #[rustc_dummy] ();
|
|
|
|
let _ = #[rustc_dummy] move || #[rustc_dummy] ();
|
2016-10-26 07:43:34 +00:00
|
|
|
let _ =
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy] ||
|
2022-01-21 09:34:06 +00:00
|
|
|
{
|
|
|
|
#![rustc_dummy]
|
|
|
|
#[rustc_dummy]
|
|
|
|
()
|
|
|
|
};
|
2016-10-26 07:43:34 +00:00
|
|
|
let _ =
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy] move ||
|
2022-01-21 09:34:06 +00:00
|
|
|
{
|
|
|
|
#![rustc_dummy]
|
|
|
|
#[rustc_dummy]
|
|
|
|
()
|
|
|
|
};
|
2015-11-03 16:39:51 +00:00
|
|
|
let _ =
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy] {
|
2022-01-21 09:34:06 +00:00
|
|
|
#![rustc_dummy]
|
|
|
|
};
|
2015-11-03 16:39:51 +00:00
|
|
|
let _ =
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy] {
|
2022-01-21 09:34:06 +00:00
|
|
|
#![rustc_dummy]
|
|
|
|
let _ = ();
|
|
|
|
};
|
2015-11-03 16:39:51 +00:00
|
|
|
let _ =
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy] {
|
2022-01-21 09:34:06 +00:00
|
|
|
#![rustc_dummy]
|
|
|
|
let _ = ();
|
|
|
|
()
|
|
|
|
};
|
2022-03-16 00:20:21 +00:00
|
|
|
let const {
|
|
|
|
#![rustc_dummy]
|
|
|
|
} =
|
|
|
|
#[rustc_dummy] const {
|
|
|
|
#![rustc_dummy]
|
|
|
|
};
|
2015-11-03 16:39:51 +00:00
|
|
|
let mut x = 0;
|
2019-06-08 08:36:43 +00:00
|
|
|
let _ = #[rustc_dummy] x = 15;
|
|
|
|
let _ = #[rustc_dummy] x += 15;
|
2022-01-22 02:10:12 +00:00
|
|
|
let s = Foo { data: () };
|
2019-06-08 08:36:43 +00:00
|
|
|
let _ = #[rustc_dummy] s.data;
|
|
|
|
let _ = (#[rustc_dummy] s).data;
|
2015-11-03 16:39:51 +00:00
|
|
|
let t = Bar(());
|
2019-06-08 08:36:43 +00:00
|
|
|
let _ = #[rustc_dummy] t.0;
|
|
|
|
let _ = (#[rustc_dummy] t).0;
|
2015-11-03 16:39:51 +00:00
|
|
|
let v = vec!(0);
|
2019-06-08 08:36:43 +00:00
|
|
|
let _ = #[rustc_dummy] v[0];
|
|
|
|
let _ = (#[rustc_dummy] v)[0];
|
|
|
|
let _ = #[rustc_dummy] 0..#[rustc_dummy] 0;
|
|
|
|
let _ = #[rustc_dummy] 0..;
|
|
|
|
let _ = #[rustc_dummy] (0..0);
|
|
|
|
let _ = #[rustc_dummy] (0..);
|
|
|
|
let _ = #[rustc_dummy] (..0);
|
|
|
|
let _ = #[rustc_dummy] (..);
|
|
|
|
let _: fn(&u32) -> u32 = #[rustc_dummy] std::clone::Clone::clone;
|
|
|
|
let _ = #[rustc_dummy] &0;
|
|
|
|
let _ = #[rustc_dummy] &mut 0;
|
|
|
|
let _ = #[rustc_dummy] &#[rustc_dummy] 0;
|
|
|
|
let _ = #[rustc_dummy] &mut #[rustc_dummy] 0;
|
2021-12-05 20:35:09 +00:00
|
|
|
while false { let _ = #[rustc_dummy] continue; }
|
|
|
|
while true { let _ = #[rustc_dummy] break; }
|
2019-06-08 08:36:43 +00:00
|
|
|
|| #[rustc_dummy] return;
|
|
|
|
let _ = #[rustc_dummy] expr_mac!();
|
|
|
|
let _ = #[rustc_dummy] expr_mac![];
|
2021-12-01 19:45:14 +00:00
|
|
|
let _ = #[rustc_dummy] expr_mac! {};
|
2022-01-22 02:10:12 +00:00
|
|
|
let _ = #[rustc_dummy] Foo { data: () };
|
|
|
|
let _ = #[rustc_dummy] Foo { ..s };
|
|
|
|
let _ = #[rustc_dummy] Foo { data: (), ..s };
|
2021-03-19 23:52:07 +00:00
|
|
|
let _ = #[rustc_dummy] (0);
|
2015-11-03 16:39:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn _12() {
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2015-11-03 16:39:51 +00:00
|
|
|
let _ = 0;
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2015-11-03 16:39:51 +00:00
|
|
|
0;
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2015-11-03 16:39:51 +00:00
|
|
|
expr_mac!();
|
|
|
|
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2015-11-03 16:39:51 +00:00
|
|
|
{
|
2019-06-08 08:36:43 +00:00
|
|
|
#![rustc_dummy]
|
2015-11-03 16:39:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-01 19:45:14 +00:00
|
|
|
fn foo() {}
|
|
|
|
fn foo3(_: i32, _: (), _: ()) {}
|
|
|
|
fn qux(_: i32) {}
|