2020-02-16 00:04:20 +00:00
|
|
|
// pp-exact
|
|
|
|
|
|
|
|
#[cfg(FALSE)]
|
|
|
|
fn simple_attr() {
|
|
|
|
|
|
|
|
#[attr]
|
2021-12-01 19:45:14 +00:00
|
|
|
if true {}
|
2020-02-16 00:04:20 +00:00
|
|
|
|
|
|
|
#[allow_warnings]
|
2021-12-01 19:45:14 +00:00
|
|
|
if true {}
|
2020-02-16 00:04:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(FALSE)]
|
|
|
|
fn if_else_chain() {
|
|
|
|
|
|
|
|
#[first_attr]
|
2021-12-01 19:45:14 +00:00
|
|
|
if true {} else if false {} else {}
|
2020-02-16 00:04:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(FALSE)]
|
|
|
|
fn if_let() {
|
|
|
|
|
|
|
|
#[attr]
|
2021-12-01 19:45:14 +00:00
|
|
|
if let Some(_) = Some(true) {}
|
2020-02-16 00:04:20 +00:00
|
|
|
}
|
|
|
|
|
2020-02-19 16:05:31 +00:00
|
|
|
#[cfg(FALSE)]
|
|
|
|
fn let_attr_if() {
|
2021-12-01 19:45:14 +00:00
|
|
|
let _ = #[attr] if let _ = 0 {};
|
|
|
|
let _ = #[attr] if true {};
|
2020-02-19 16:05:31 +00:00
|
|
|
|
2021-12-01 19:45:14 +00:00
|
|
|
let _ = #[attr] if let _ = 0 {} else {};
|
|
|
|
let _ = #[attr] if true {} else {};
|
2020-02-19 16:05:31 +00:00
|
|
|
}
|
|
|
|
|
2020-02-16 00:04:20 +00:00
|
|
|
|
2021-12-01 19:45:14 +00:00
|
|
|
fn main() {}
|