]> git.lizzy.rs Git - rust.git/blob - tests/source/attrib.rs
Merge pull request #208 from cassiersg/rewrite-attrs
[rust.git] / tests / source / attrib.rs
1 // Test attributes and doc comments are preserved.
2
3 /// Blah blah blah.
4 /// Blah blah blah.
5 /// Blah blah blah.
6 /// Blah blah blah.
7
8 /// Blah blah blah.
9 impl Bar {
10     /// Blah blah blooo.
11     /// Blah blah blooo.
12     /// Blah blah blooo.
13     /// Blah blah blooo.
14     #[an_attribute]
15     fn foo(&mut self) -> isize {
16     }
17
18     /// Blah blah bing.
19     /// Blah blah bing.
20     /// Blah blah bing.
21
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
36     #[attrib1]
37     /// Blah blah bing.
38     #[attrib2]
39     // Another comment that needs rewrite because it's tooooooooooooooooooooooooooooooo loooooooooooong.
40     /// Blah blah bing.
41     fn f4(self) -> Cat {
42     }
43 }