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