]> git.lizzy.rs Git - rust.git/blob - tests/target/attrib.rs
Merge pull request #575 from nrc/comments
[rust.git] / tests / target / attrib.rs
1 // rustfmt-wrap_comments: true
2 // Test attributes and doc comments are preserved.
3
4 /// Blah blah blah.
5 /// Blah blah blah.
6 /// Blah blah blah.
7 /// Blah blah blah.
8
9 /// Blah blah blah.
10 impl Bar {
11     /// Blah blah blooo.
12     /// Blah blah blooo.
13     /// Blah blah blooo.
14     /// Blah blah blooo.
15     #[an_attribute]
16     fn foo(&mut self) -> isize {
17     }
18
19     /// Blah blah bing.
20     /// Blah blah bing.
21     /// Blah blah bing.
22
23     /// Blah blah bing.
24     /// Blah blah bing.
25     /// Blah blah bing.
26     pub fn f2(self) {
27         (foo, bar)
28     }
29
30     #[another_attribute]
31     fn f3(self) -> Dog {
32     }
33
34     /// Blah blah bing.
35     #[attrib1]
36     /// Blah blah bing.
37     #[attrib2]
38     // Another comment that needs rewrite because it's tooooooooooooooooooooooooooooooo
39     // loooooooooooong.
40     /// Blah blah bing.
41     fn f4(self) -> Cat {
42     }
43 }