]> git.lizzy.rs Git - rust.git/blob - tests/target/attrib.rs
Handle attributes on modules (#968)
[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     /// Blah blah bing.
19     /// Blah blah bing.
20     /// Blah blah bing.
21
22     /// Blah blah bing.
23     /// Blah blah bing.
24     /// Blah blah bing.
25     pub fn f2(self) {
26         (foo, bar)
27     }
28
29     #[another_attribute]
30     fn f3(self) -> Dog {}
31
32     /// Blah blah bing.
33     #[attrib1]
34     /// Blah blah bing.
35     #[attrib2]
36     // Another comment that needs rewrite because it's
37     // tooooooooooooooooooooooooooooooo loooooooooooong.
38     /// Blah blah bing.
39     fn f4(self) -> Cat {}
40 }