rust/tests/pretty/if-attr.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
497 B
Rust
Raw Normal View History

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