]> git.lizzy.rs Git - rust.git/blob - tests/target/chains-no-overflow.rs
Merge pull request #966 from MicahChalmer/skip-children-in-plain-write-mode
[rust.git] / tests / target / chains-no-overflow.rs
1 // rustfmt-chains_overflow_last: false
2 // Test chain formatting without overflowing the last item.
3
4 fn main() {
5     bbbbbbbbbbbbbbbbbbb.ccccccccccccccccccccccccccccccccccccc
6         .ddddddddddddddddddddddddddd();
7
8     bbbbbbbbbbbbbbbbbbb.ccccccccccccccccccccccccccccccccccccc
9         .ddddddddddddddddddddddddddd
10         .eeeeeeee();
11
12     x().y(|| match cond() {
13             true => (),
14             false => (),
15         });
16
17     loong_func()
18         .quux(move || if true {
19             1
20         } else {
21             2
22         });
23
24     fffffffffffffffffffffffffffffffffff(a,
25                                         {
26                                             SCRIPT_TASK_ROOT.with(|root| {
27                                                     *root.borrow_mut() = Some(&script_task);
28                                                 });
29                                         });
30
31     let suuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum = xxxxxxx.map(|x| x + 5)
32         .map(|x| x / 2)
33         .fold(0, |acc, x| acc + x);
34
35     aaaaaaaaaaaaaaaa.map(|x| {
36             x += 1;
37             x
38         })
39         .filter(some_mod::some_filter)
40 }