// Test case where first chain element isn't a path, but is shorter than
// the size of a tab.
x().y(|| match cond() {
- true => (),
- false => (),
- });
+ true => (),
+ false => (),
+ });
loong_func().quux(move || if true {
- 1
- } else {
- 2
- });
+ 1
+ } else {
+ 2
+ });
some_fuuuuuuuuunction().method_call_a(aaaaa, bbbbb, |c| {
let x = c;
});
fffffffffffffffffffffffffffffffffff(a, {
- SCRIPT_TASK_ROOT.with(|root| { *root.borrow_mut() = Some(&script_task); });
+ SCRIPT_TASK_ROOT.with(|root| {
+ *root.borrow_mut() = Some(&script_task);
+ });
});
let suuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum =
aaaaaaaaaaaaaaaa
.map(|x| {
- x += 1;
- x
- })
+ x += 1;
+ x
+ })
.filter(some_mod::some_filter)
}
match x {
PushParam => {
// params are 1-indexed
- stack.push(mparams[match cur.to_digit(10) {
- Some(d) => d as usize - 1,
- None => return Err("bad param number".to_owned()),
- }].clone());
+ stack.push(
+ mparams[match cur.to_digit(10) {
+ Some(d) => d as usize - 1,
+ None => return Err("bad param number".to_owned()),
+ }].clone(),
+ );
}
}
}
Foo { x: val }
.baz(|| {
- force();
- multiline();
- })
+ force();
+ multiline();
+ })
.quux();
Foo {
y: i_am_multi_line,
z: ok,
}.baz(|| {
- force();
- multiline();
- })
+ force();
+ multiline();
+ })
.quux();
- a +
- match x {
+ a + match x {
true => "yay!",
false => "boo!",
}.bar()
}?;
ty::tls::with(|tcx| {
- let tap = ty::Binder(TraitAndProjections(principal, projections));
- in_binder(f, tcx, &ty::Binder(""), Some(tap))
- })?;
+ let tap = ty::Binder(TraitAndProjections(principal, projections));
+ in_binder(f, tcx, &ty::Binder(""), Some(tap))
+ })?;
+}
+
+fn issue1392() {
+ test_method(
+ r#"
+ if foo {
+ a();
+ }
+ else {
+ b();
+ }
+ "#.trim(),
+ );
}