| 1 | fn main() { |
| 2 | _ := [ |
| 3 | // pre comment |
| 4 | 6, |
| 5 | // and after |
| 6 | ] |
| 7 | _ := [ |
| 8 | 7, |
| 9 | // below expr |
| 10 | ] |
| 11 | _ := [ |
| 12 | 8, // I don't know why this still is a block comment |
| 13 | 9, |
| 14 | ] |
| 15 | arr := [ |
| 16 | // test 0 |
| 17 | 1, |
| 18 | // test 1 |
| 19 | 2, |
| 20 | // test 2 |
| 21 | 3, // 3 |
| 22 | 4, // 4-1 |
| 23 | ] |
| 24 | } |
| 25 | |
| 26 | fn only_comments_array() { |
| 27 | _ := [] |
| 28 | _ := [ |
| 29 | // 1, |
| 30 | // 2, |
| 31 | // 3, |
| 32 | ] |
| 33 | _ := [ |
| 34 | // whatever */ /* this is */ // 3, |
| 35 | // 4, |
| 36 | ] |
| 37 | } |
| 38 | |
| 39 | fn mixed_comments() { |
| 40 | _ := [ |
| 41 | 3, // iembed |
| 42 | // keep line comment here |
| 43 | // and here |
| 44 | 5, |
| 45 | ] |
| 46 | } |
| 47 | |
| 48 | fn keep_real_block_comment() { |
| 49 | _ := [ |
| 50 | 'foo', |
| 51 | /* |
| 52 | 'bar', |
| 53 | 'baz', |
| 54 | 'spam', |
| 55 | */ |
| 56 | 'eggs', |
| 57 | ] |
| 58 | } |
| 59 | |