]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | // rustfmt-file_lines: [{"file":"tests/source/file-lines-3.rs","range":[4,8]},{"file":"tests/source/file-lines-3.rs","range":[10,15]}] |
2 | ||
3 | fn floaters() { | |
4 | let x = Foo { | |
5 | field1: val1, | |
6 | field2: val2, | |
7 | } | |
8 | .method_call().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 | // comment | |
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 | } |