|
| 1 | +// rustfmt-format_code_in_doc_comments: true |
| 2 | + |
| 3 | +// https://github.com/rust-lang/rustfmt/issues/4420 |
| 4 | +enum Minimal { |
| 5 | + Example, |
| 6 | + //[thisisremoved thatsleft |
| 7 | + // canbeanything |
| 8 | +} |
| 9 | + |
| 10 | +struct Minimal2 { |
| 11 | + Example: usize, |
| 12 | + //[thisisremoved thatsleft |
| 13 | + // canbeanything |
| 14 | +} |
| 15 | + |
| 16 | +pub enum E { |
| 17 | + // Expand as needed, numbers should be ascending according to the stage |
| 18 | + // through the inclusion pipeline, or according to the descriptions |
| 19 | + Variant1, |
| 20 | + // Expand as needed, numbers should be ascending according to the stage |
| 21 | + // through the inclusion pipeline, or according to the descriptions |
| 22 | + Variant2, |
| 23 | + // Expand as needed, numbers should be ascending according to the stage |
| 24 | + // through the inclusion pipeline, or according to the descriptions |
| 25 | +} |
| 26 | + |
| 27 | +pub enum E2 { |
| 28 | + // This can be changed once https://github.com/rust-lang/rustfmt/issues/4854 is fixed |
| 29 | +// Expand as needed, numbers should be ascending according to the stage |
| 30 | +// through the inclusion pipeline, or according to the descriptions |
| 31 | +} |
| 32 | + |
| 33 | +pub struct S { |
| 34 | + // Expand as needed, numbers should be ascending according to the stage |
| 35 | + // through the inclusion pipeline, or according to the descriptions |
| 36 | + some_field: usize, |
| 37 | + // Expand as needed, numbers should be ascending according to the stage |
| 38 | + // through the inclusion pipeline, or according to the descriptions |
| 39 | + last_field: usize, |
| 40 | + // Expand as needed, numbers should be ascending according to the stage |
| 41 | + // through the inclusion pipeline, or according to the descriptions |
| 42 | +} |
| 43 | + |
| 44 | +pub struct S2 { |
| 45 | + // This can be changed once https://github.com/rust-lang/rustfmt/issues/4854 is fixed |
| 46 | +// Expand as needed, numbers should be ascending according to the stage |
| 47 | +// through the inclusion pipeline, or according to the descriptions |
| 48 | +} |
| 49 | + |
| 50 | +fn foo( |
| 51 | + // Expand as needed, numbers should be ascending according to the stage |
| 52 | + // through the inclusion pipeline, or according to the descriptions |
| 53 | + a: usize, |
| 54 | + // Expand as needed, numbers should be ascending according to the stage |
| 55 | + // through the inclusion pipeline, or according to the descriptions |
| 56 | + b: usize, |
| 57 | + // Expand as needed, numbers should be ascending according to the stage |
| 58 | + // through the inclusion pipeline, or according to the descriptions |
| 59 | +) -> usize { |
| 60 | + 5 |
| 61 | +} |
| 62 | + |
| 63 | +fn foo2(// Expand as needed, numbers should be ascending according to the stage |
| 64 | + // through the inclusion pipeline, or according to the descriptions |
| 65 | +) -> usize { |
| 66 | + 5 |
| 67 | +} |
| 68 | + |
| 69 | +fn main() { |
| 70 | + let v = vec![ |
| 71 | + // Expand as needed, numbers should be ascending according to the stage |
| 72 | + // through the inclusion pipeline, or according to the descriptions |
| 73 | + 1, |
| 74 | + // Expand as needed, numbers should be ascending according to the stage |
| 75 | + // through the inclusion pipeline, or according to the descriptions |
| 76 | + 2, |
| 77 | + // Expand as needed, numbers should be ascending according to the stage |
| 78 | + // through the inclusion pipeline, or according to the descriptions |
| 79 | + ]; |
| 80 | + |
| 81 | + let v2: Vec<i32> = vec![ |
| 82 | + // Expand as needed, numbers should be ascending according to the stage |
| 83 | + // through the inclusion pipeline, or according to the descriptions |
| 84 | + ]; |
| 85 | + |
| 86 | + match a { |
| 87 | + // Expand as needed, numbers should be ascending according to the stage |
| 88 | + // through the inclusion pipeline, or according to the descriptions |
| 89 | + b => c, |
| 90 | + // Expand as needed, numbers should be ascending according to the stage |
| 91 | + // through the inclusion pipeline, or according to the descriptions |
| 92 | + d => e, |
| 93 | + // Expand as needed, numbers should be ascending according to the stage |
| 94 | + // through the inclusion pipeline, or according to the descriptions |
| 95 | + } |
| 96 | +} |
0 commit comments