1 // rustfmt-wrap_comments: true
2 // Test attributes and doc comments are preserved.
4 html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
5 html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
6 html_root_url = "https://doc.rust-lang.org/nightly/",
7 html_playground_url = "https://play.rust-lang.org/",
8 test(attr(deny(warnings)))
19 // Comment on attribute
36 #[doc = "an attribute that shouldn't be normalized to a doc comment"]
37 fn foo(&mut self) -> isize {}
58 // Another comment that needs rewrite because it's tooooooooooooooooooooooooooooooo
63 // We want spaces around `=`
64 #[cfg(feature = "nightly")]
65 fn f5(self) -> Monkey {}
70 #[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
76 /// Default path (*nix)
79 not(target_os = "macos"),
80 not(target_os = "ios"),
81 not(target_os = "android")
84 #[cfg(target_os = "freertos")]
86 'a' | 'A' => GpioPort {
89 'b' | 'B' => GpioPort {
95 #[cfg_attr(not(target_os = "freertos"), allow(unused_variables))]
101 #[should_panic(expected = "(")]
102 #[should_panic(expected = /* ( */ "(")]
103 #[should_panic(/* ((((( */expected /* ((((( */= /* ((((( */ "("/* ((((( */)]
106 (((((((((()(((((((( */
114 #[allow(unreachable_code)] // https://github.com/rust-lang/rust/issues/43336
117 #[allow(unreachable_code)]
118 // https://github.com/rust-lang/rust/issues/43336
122 // Formatting inner attributes
123 fn inner_attributes() {
124 #![this_is_an_inner_attribute(foo)]
129 impl InnerAttributes() {
130 #![this_is_an_inner_attribute(foo)]
135 mod InnerAttributes {
136 #![this_is_an_inner_attribute(foo)]
139 fn attributes_on_statements() {
163 Add, Sub, Mul, Div, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Debug, Hash, Serialize, Mul,
184 pub struct HP(pub u8);
186 // Long `#[doc = "..."]`
188 #[doc = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]
194 feature = "this_line_is_101_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
201 #[clippy::bar(a, b, c)]
205 #[derive(Debug, StructOpt)]
206 #[structopt(about = "Display information about the character on FF Logs")]
208 #[structopt(help = "The server the character is on")]
210 #[structopt(help = "The character's first name")]
212 #[structopt(help = "The character's last name")]
217 help = "The job to look at",
229 target_os = "android",
230 target_os = "netbsd",
231 target_os = "dragonfly",
233 target_os = "emscripten",
234 target_os = "solaris",
235 target_os = "cloudabi",
238 target_os = "freebsd",
239 target_os = "openbsd",
240 target_os = "bitrig",
242 target_os = "fuchsia",
244 all(target_arch = "wasm32", feature = "stdweb"),
245 all(target_arch = "wasm32", feature = "wasm-bindgen"),