]> git.lizzy.rs Git - rust.git/blob - src/test/pretty/if-attr.rs
Rollup merge of #73955 - hellow554:unsafe_process, r=Mark-Simulacrum
[rust.git] / src / test / pretty / if-attr.rs
1 // pp-exact
2
3 #[cfg(FALSE)]
4 fn simple_attr() {
5
6     #[attr]
7     if true { }
8
9     #[allow_warnings]
10     if true { }
11 }
12
13 #[cfg(FALSE)]
14 fn if_else_chain() {
15
16     #[first_attr]
17     if true { } else if false { } else { }
18 }
19
20 #[cfg(FALSE)]
21 fn if_let() {
22
23     #[attr]
24     if let Some(_) = Some(true) { }
25 }
26
27 #[cfg(FALSE)]
28 fn let_attr_if() {
29     let _ = #[attr] if let _ = 0 { };
30     let _ = #[attr] if true { };
31
32     let _ = #[attr] if let _ = 0 { } else { };
33     let _ = #[attr] if true { } else { };
34 }
35
36
37 fn main() { }