1 // rustfmt-wrap_comments: true
2 // Test attributes and doc comments are preserved.
12 // Comment on attribute
32 fn foo(&mut self) -> isize {}
53 // Another comment that needs rewrite because it's tooooooooooooooooooooooooooooooo
58 // We want spaces around `=`
59 #[cfg(feature = "nightly")]
60 fn f5(self) -> Monkey {}
65 #[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
71 /// Default path (*nix)
72 #[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))]
74 #[cfg(target_os = "freertos")]
76 'a' | 'A' => GpioPort {
79 'b' | 'B' => GpioPort {
85 #[cfg_attr(not(target_os = "freertos"), allow(unused_variables))]
91 #[should_panic(expected = "(")]
92 #[should_panic(expected = /* ( */ "(")]
93 #[should_panic(/* ((((( */expected /* ((((( */= /* ((((( */ "("/* ((((( */)]
96 (((((((((()(((((((( */
104 #[allow(unreachable_code)] // https://github.com/rust-lang/rust/issues/43336
107 #[allow(unreachable_code)]
108 // https://github.com/rust-lang/rust/issues/43336
112 // Formatting inner attributes
113 fn inner_attributes() {
114 #![this_is_an_inner_attribute(foo)]
119 impl InnerAttributes() {
120 #![this_is_an_inner_attribute(foo)]
125 mod InnerAttributes {
126 #![this_is_an_inner_attribute(foo)]
129 fn attributes_on_statements() {
152 #[derive(Add, Sub, Mul, Div, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Debug, Hash, Serialize,
154 pub struct HP(pub u8);