summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/issue-1127.rs
blob: b49db4e3f65d6f82478dc8585163afa0aca5250e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// rustfmt-max_width: 120
// rustfmt-match_arm_blocks: false
// rustfmt-match_block_trailing_comma: true

fn a_very_very_very_very_very_very_very_very_very_very_very_long_function_name() -> i32 {
    42
}

enum TestEnum {
    AVeryVeryLongEnumName,
    AnotherVeryLongEnumName,
    TheLastVeryLongEnumName,
}

fn main() {
    let var = TestEnum::AVeryVeryLongEnumName;
    let num = match var {
        TestEnum::AVeryVeryLongEnumName => a_very_very_very_very_very_very_very_very_very_very_very_long_function_name(),
        TestEnum::AnotherVeryLongEnumName => a_very_very_very_very_very_very_very_very_very_very_very_long_function_name(),
        TestEnum::TheLastVeryLongEnumName => a_very_very_very_very_very_very_very_very_very_very_very_long_function_name(),
    };
}