summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/configs/chain_width/always.rs
blob: 2d16d66aec12df04ba4ee7e55ee4808529488138 (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-chain_width: 1
// setting an unachievable chain_width to always get chains
// on separate lines

struct Fluent {}

impl Fluent {
    fn blorp(&self) -> &Self {
        self
    }
}

fn main() {
    let test = Fluent {};

    // should be left alone
    test.blorp();

    // should be wrapped
    test.blorp().blorp();
    test.blorp().blorp().blorp();
    test.blorp().blorp().blorp().blorp();
}