]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/comment4.rs
Auto merge of #84549 - tmiasko:static-initializer, r=varkor
[rust.git] / src / tools / rustfmt / tests / target / comment4.rs
1 #![allow(dead_code)] // bar
2
3 //! Doc comment
4 fn test() {
5     // comment
6     // comment2
7
8     code(); /* leave this comment alone!
9              * ok? */
10
11     /* Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a
12      * diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam
13      * viverra nec consectetur ante hendrerit. Donec et mollis dolor.
14      * Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam
15      * tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut
16      * libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit
17      * amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis
18      * felis, pulvinar a semper sed, adipiscing id dolor. */
19
20     // Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooong comment that should be split
21
22     // println!("{:?}", rewrite_comment(subslice,
23     //                                       false,
24     //                                       comment_width,
25     //                                       self.block_indent,
26     //                                       self.config)
27     //                           .unwrap());
28
29     funk(); //dontchangeme
30             // or me
31 }
32
33 /// test123
34 fn doc_comment() {}
35
36 /*
37 Regression test for issue #956
38
39 (some very important text)
40 */
41
42 /*
43 fn debug_function() {
44     println!("hello");
45 }
46 // */
47
48 #[link_section=".vectors"]
49 #[no_mangle] // Test this attribute is preserved.
50 #[cfg_attr(rustfmt, rustfmt::skip)]
51 pub static ISSUE_1284: [i32; 16] = [];