]> git.lizzy.rs Git - rust.git/blob - tests/target/file-lines-1.rs
Merge pull request #1578 from topecongiro/poor/macro
[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     }.method_call()
8         .method_call();
9
10     let y = if cond {
11                 val1
12             } else {
13                 val2
14             }
15                 .method_call();
16
17     {
18         match x {
19             PushParam => {
20                 stack.push(mparams[match cur.to_digit(10) {
21                                             Some(d) => d as usize - 1,
22                                             None => return Err("bad param number".to_owned()),
23                                         }]
24                                .clone());
25             }
26         }
27     }
28 }