2019-12-04 04:16:12 -06:00
|
|
|
// pp-exact
|
|
|
|
|
2021-12-01 13:45:14 -06:00
|
|
|
fn main() {}
|
2019-12-04 04:16:12 -06:00
|
|
|
|
|
|
|
#[cfg(FALSE)]
|
|
|
|
fn syntax() {
|
|
|
|
let _ = #[attr] box 0;
|
2021-03-19 18:52:07 -05:00
|
|
|
let _ = #[attr] [];
|
|
|
|
let _ = #[attr] [0];
|
|
|
|
let _ = #[attr] [0; 0];
|
|
|
|
let _ = #[attr] [0, 0, 0];
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ = #[attr] foo();
|
|
|
|
let _ = #[attr] x.foo();
|
2021-03-19 18:52:07 -05:00
|
|
|
let _ = #[attr] ();
|
|
|
|
let _ = #[attr] (#[attr] 0,);
|
|
|
|
let _ = #[attr] (#[attr] 0, 0);
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ = #[attr] 0 + #[attr] 0;
|
|
|
|
let _ = #[attr] 0 / #[attr] 0;
|
|
|
|
let _ = #[attr] 0 & #[attr] 0;
|
|
|
|
let _ = #[attr] 0 % #[attr] 0;
|
|
|
|
let _ = #[attr] (0 + 0);
|
|
|
|
let _ = #[attr] !0;
|
|
|
|
let _ = #[attr] -0;
|
|
|
|
let _ = #[attr] false;
|
|
|
|
let _ = #[attr] 0;
|
|
|
|
let _ = #[attr] 'c';
|
|
|
|
let _ = #[attr] x as Y;
|
|
|
|
let _ = #[attr] (x as Y);
|
|
|
|
let _ =
|
|
|
|
#[attr] while true {
|
2022-01-21 03:34:06 -06:00
|
|
|
#![attr]
|
|
|
|
};
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ =
|
|
|
|
#[attr] while let Some(false) = true {
|
2022-01-21 03:34:06 -06:00
|
|
|
#![attr]
|
|
|
|
};
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ =
|
|
|
|
#[attr] for x in y {
|
2022-01-21 03:34:06 -06:00
|
|
|
#![attr]
|
|
|
|
};
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ =
|
2021-06-16 05:25:00 -05:00
|
|
|
#[attr] loop {
|
2022-01-21 03:34:06 -06:00
|
|
|
#![attr]
|
|
|
|
};
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ =
|
2021-05-11 14:21:54 -05:00
|
|
|
#[attr] match true {
|
2022-01-21 03:34:06 -06:00
|
|
|
#![attr]
|
|
|
|
#[attr]
|
|
|
|
_ => false,
|
|
|
|
};
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ = #[attr] || #[attr] foo;
|
|
|
|
let _ = #[attr] move || #[attr] foo;
|
|
|
|
let _ =
|
|
|
|
#[attr] ||
|
2022-01-21 03:34:06 -06:00
|
|
|
#[attr] {
|
|
|
|
#![attr]
|
|
|
|
foo
|
|
|
|
};
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ =
|
|
|
|
#[attr] move ||
|
2022-01-21 03:34:06 -06:00
|
|
|
#[attr] {
|
|
|
|
#![attr]
|
|
|
|
foo
|
|
|
|
};
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ =
|
|
|
|
#[attr] ||
|
2022-01-21 03:34:06 -06:00
|
|
|
{
|
|
|
|
#![attr]
|
|
|
|
foo
|
|
|
|
};
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ =
|
|
|
|
#[attr] move ||
|
2022-01-21 03:34:06 -06:00
|
|
|
{
|
|
|
|
#![attr]
|
|
|
|
foo
|
|
|
|
};
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ =
|
|
|
|
#[attr] {
|
2022-01-21 03:34:06 -06:00
|
|
|
#![attr]
|
|
|
|
};
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ =
|
|
|
|
#[attr] {
|
2022-01-21 03:34:06 -06:00
|
|
|
#![attr]
|
|
|
|
let _ = ();
|
|
|
|
};
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ =
|
|
|
|
#[attr] {
|
2022-01-21 03:34:06 -06:00
|
|
|
#![attr]
|
|
|
|
let _ = ();
|
|
|
|
foo
|
|
|
|
};
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ = #[attr] x = y;
|
|
|
|
let _ = #[attr] (x = y);
|
|
|
|
let _ = #[attr] x += y;
|
|
|
|
let _ = #[attr] (x += y);
|
|
|
|
let _ = #[attr] foo.bar;
|
|
|
|
let _ = (#[attr] foo).bar;
|
|
|
|
let _ = #[attr] foo.0;
|
|
|
|
let _ = (#[attr] foo).0;
|
|
|
|
let _ = #[attr] foo[bar];
|
|
|
|
let _ = (#[attr] foo)[bar];
|
|
|
|
let _ = #[attr] 0..#[attr] 0;
|
|
|
|
let _ = #[attr] 0..;
|
|
|
|
let _ = #[attr] (0..0);
|
|
|
|
let _ = #[attr] (0..);
|
|
|
|
let _ = #[attr] (..0);
|
|
|
|
let _ = #[attr] (..);
|
|
|
|
let _ = #[attr] foo::bar::baz;
|
|
|
|
let _ = #[attr] &0;
|
|
|
|
let _ = #[attr] &mut 0;
|
|
|
|
let _ = #[attr] &#[attr] 0;
|
|
|
|
let _ = #[attr] &mut #[attr] 0;
|
2021-12-05 14:35:09 -06:00
|
|
|
let _ = #[attr] break;
|
|
|
|
let _ = #[attr] continue;
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ = #[attr] return;
|
|
|
|
let _ = #[attr] foo!();
|
2021-05-01 14:54:47 -05:00
|
|
|
let _ = #[attr] foo!(#! [attr]);
|
2019-12-04 04:16:12 -06:00
|
|
|
let _ = #[attr] foo![];
|
2021-05-01 14:54:47 -05:00
|
|
|
let _ = #[attr] foo![#! [attr]];
|
2021-12-01 13:45:14 -06:00
|
|
|
let _ = #[attr] foo! {};
|
2021-05-01 14:54:47 -05:00
|
|
|
let _ = #[attr] foo! { #! [attr] };
|
2022-01-21 20:10:12 -06:00
|
|
|
let _ = #[attr] Foo { bar: baz };
|
|
|
|
let _ = #[attr] Foo { ..foo };
|
|
|
|
let _ = #[attr] Foo { bar: baz, ..foo };
|
2021-03-19 18:52:07 -05:00
|
|
|
let _ = #[attr] (0);
|
2019-12-04 04:16:12 -06:00
|
|
|
|
|
|
|
{
|
|
|
|
#[attr]
|
|
|
|
let _ = 0;
|
|
|
|
|
|
|
|
#[attr]
|
|
|
|
0;
|
|
|
|
|
|
|
|
#[attr]
|
|
|
|
foo!();
|
|
|
|
|
|
|
|
#[attr]
|
2021-12-01 13:45:14 -06:00
|
|
|
foo! {}
|
2019-12-04 04:16:12 -06:00
|
|
|
|
|
|
|
#[attr]
|
|
|
|
foo![];
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
#[attr]
|
|
|
|
let _ = 0;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
|
|
|
|
#[attr]
|
|
|
|
0
|
|
|
|
}
|
|
|
|
{
|
|
|
|
|
|
|
|
#[attr]
|
|
|
|
{
|
|
|
|
#![attr]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
|
|
|
|
#[attr]
|
|
|
|
foo!()
|
|
|
|
}
|
|
|
|
{
|
|
|
|
|
|
|
|
#[attr]
|
|
|
|
foo![]
|
|
|
|
}
|
|
|
|
{
|
|
|
|
|
|
|
|
#[attr]
|
2021-12-01 13:45:14 -06:00
|
|
|
foo! {}
|
2019-12-04 04:16:12 -06:00
|
|
|
}
|
|
|
|
}
|