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)] foo: usize,
70 /// Default path (*nix)
71 #[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))]
73 #[cfg(target_os = "freertos")]
75 'a' | 'A' => GpioPort {
78 'b' | 'B' => GpioPort {
84 #[cfg_attr(not(target_os = "freertos"), allow(unused_variables))]
90 #[should_panic(expected = "(")]
91 #[should_panic(expected = /* ( */ "(")]
92 #[should_panic(/* ((((( */expected /* ((((( */= /* ((((( */ "("/* ((((( */)]
95 (((((((((()(((((((( */
103 #[allow(unreachable_code)] // https://github.com/rust-lang/rust/issues/43336
106 #[allow(unreachable_code)]
107 // https://github.com/rust-lang/rust/issues/43336
111 // Formatting inner attributes
112 fn inner_attributes() {
113 #![this_is_an_inner_attribute(foo)]
118 impl InnerAttributes() {
119 #![this_is_an_inner_attribute(foo)]
124 mod InnerAttributes {
125 #![this_is_an_inner_attribute(foo)]
128 fn attributes_on_statements() {
151 #[derive(Add, Sub, Mul, Div, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Debug, Hash, Serialize,
153 pub struct HP(pub u8);