]> git.lizzy.rs Git - rust.git/blob - tests/target/attrib.rs
Merge pull request #208 from cassiersg/rewrite-attrs
[rust.git] / tests / target / 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     /// 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
33     /// Blah blah bing.
34     #[attrib1]
35     /// Blah blah bing.
36     #[attrib2]
37     // Another comment that needs rewrite because it's tooooooooooooooooooooooooooooooo
38     // loooooooooooong.
39     /// Blah blah bing.
40     fn f4(self) -> Cat {
41     }
42 }