]> git.lizzy.rs Git - rust.git/blob - tests/pretty/block-comment-wchar.rs
Add ~const bounds trait bounds when using derive_const
[rust.git] / tests / pretty / block-comment-wchar.rs
1 // This is meant as a test case for Issue 3961.
2 //
3 // Test via: rustc -Zunpretty normal tests/pretty/block-comment-wchar.rs
4 // ignore-tidy-cr
5 // ignore-tidy-tab
6 // pp-exact:block-comment-wchar.pp
7 fn f() {
8     fn nested() {
9         /*
10   Spaced2
11         */
12         /*
13           Spaced10
14         */
15         /*
16                                                                   Tabbed8+2
17         */
18         /*
19 \r\r\r\r\r\r\r\r  CR8+2
20         */
21     }
22     /*
23   Spaced2:                       (prefixed so start of space aligns with comment)
24     */
25     /*
26                 Tabbed2: (more indented b/c *start* of space will align with comment)
27     */
28     /*
29       Spaced6:                       (Alignment removed and realigning spaces inserted)
30     */
31     /*
32                                   Tabbed4+2:                     (Alignment removed and realigning spaces inserted)
33     */
34
35     /*
36 \v\v\v\v  VT4+2:                         (should align)
37     */
38     /*
39 \f\f\f\f  FF4+2:                         (should align)
40     */
41     /*
42 \r\r\r\r  CR4+2:                         (should align)
43     */
44     /*
45 \85\85\85\85  NEL4+2:                        (should align)
46     */
47     /*
48       Ogham Space Mark 4+2:          (should align)
49     */
50     /*
51       Ogham Space Mark 4+2: (should align)
52     */
53     /*
54       Four-per-em space 4+2:         (should align)
55     */
56
57     /*
58       Ogham Space Mark   count 1: (should align)
59       Ogham Space Mark   count 2: (should align)
60       Ogham Space Mark   count 3: (should align)
61       Ogham Space Mark   count 4: (should align)
62       Ogham Space Mark   count 5: (should align)
63       Ogham Space Mark   count 6: (should align)
64       Ogham Space Mark   count 7: (should align)
65       Ogham Space Mark   count 8: (should align)
66       Ogham Space Mark   count 9: (should align)
67       Ogham Space Mark   count A: (should align)
68       Ogham Space Mark   count B: (should align)
69       Ogham Space Mark   count C: (should align)
70       Ogham Space Mark   count D: (should align)
71       Ogham Space Mark   count E: (should align)
72       Ogham Space Mark   count F: (should align)
73     */
74
75
76 /* */ /*
77         Hello from offset 6
78         Space 6+2:                     compare A
79         Ogham Space Mark 6+2: compare B
80       */
81 /* */ /*
82         Hello from another offset 6 with wchars establishing column offset
83         Space 6+2:                     compare C
84         Ogham Space Mark 6+2: compare D
85       */
86 }
87
88 fn main() {
89     // Taken from https://www.unicode.org/Public/UNIDATA/PropList.txt
90     let chars =
91         ['\x0A', '\x0B', '\x0C', '\x0D', '\x20', '\u{85}', '\u{A0}',
92          '\u{1680}', '\u{2000}', '\u{2001}', '\u{2002}', '\u{2003}',
93          '\u{2004}', '\u{2005}', '\u{2006}', '\u{2007}', '\u{2008}',
94          '\u{2009}', '\u{200A}', '\u{2028}', '\u{2029}', '\u{202F}',
95          '\u{205F}', '\u{3000}'];
96     for c in &chars {
97         let ws = c.is_whitespace();
98         println!("{} {}", c , ws);
99     }
100 }