0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-25 12:12:19 +01:00
rust/tests/pretty/if-attr.rs
2023-01-11 09:32:08 +00:00

38 lines
496 B
Rust

// pp-exact
#[cfg(FALSE)]
fn simple_attr() {
#[attr]
if true {}
#[allow_warnings]
if true {}
}
#[cfg(FALSE)]
fn if_else_chain() {
#[first_attr]
if true {} else if false {} else {}
}
#[cfg(FALSE)]
fn if_let() {
#[attr]
if let Some(_) = Some(true) {}
}
#[cfg(FALSE)]
fn let_attr_if() {
let _ = #[attr] if let _ = 0 {};
let _ = #[attr] if true {};
let _ = #[attr] if let _ = 0 {} else {};
let _ = #[attr] if true {} else {};
}
fn main() {}