]> git.lizzy.rs Git - rust.git/blob - tests/target/file-lines-3.rs
Merge pull request #1576 from topecongiro/chain/float-first-child
[rust.git] / tests / target / file-lines-3.rs
1 // rustfmt-file_lines: [{"file":"tests/source/file-lines-3.rs","range":[5,9]},{"file":"tests/source/file-lines-3.rs","range":[11,16]}]
2 // rustfmt-error_on_line_overflow: false
3
4 fn floaters() {
5     let x = Foo {
6         field1: val1,
7         field2: val2,
8     }.method_call()
9         .method_call();
10
11     let y = if cond { val1 } else { val2 }.method_call();
12
13     {
14         match x {
15             PushParam => {
16                 stack.push(mparams[match cur.to_digit(10) {
17                                             Some(d) => d as usize - 1,
18                                             None => return Err("bad param number".to_owned()),
19                                         }]
20                                .clone());
21             }
22         }
23     }
24 }