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