1 // rustfmt-normalize_comments: true
2 // rustfmt-single_line_if_else_max_width: 0
3 // Test chain formatting.
6 // Don't put chains on a single line if it wasn't so in source.
12 bbbbbbbbbbbbbbbbbbb.ccccccccccccccccccccccccccccccccccccc
13 .ddddddddddddddddddddddddddd();
15 bbbbbbbbbbbbbbbbbbb.ccccccccccccccccccccccccccccccccccccc
16 .ddddddddddddddddddddddddddd
19 // Test case where first chain element isn't a path, but is shorter than
21 x().y(|| match cond() {
26 loong_func().quux(move || if true {
32 some_fuuuuuuuuunction().method_call_a(aaaaa, bbbbb, |c| {
37 some_fuuuuuuuuunction()
38 .method_call_a(aaaaa, bbbbb, |c| {
42 .method_call_b(aaaaa, bbbbb, |c| {
47 fffffffffffffffffffffffffffffffffff(a, {
48 SCRIPT_TASK_ROOT.with(|root| { *root.borrow_mut() = Some(&script_task); });
51 let suuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum = xxxxxxx.map(|x| x + 5)
53 .fold(0, |acc, x| acc + x);
55 aaaaaaaaaaaaaaaa.map(|x| {
59 .filter(some_mod::some_filter)
85 // params are 1-indexed
86 stack.push(mparams[match cur.to_digit(10) {
87 Some(d) => d as usize - 1,
88 None => return Err("bad param number".to_owned()),
128 fn is_replaced_content() -> bool {
129 constellat.send(ConstellationMsg::ViewportConstrained(self.id, constraints))
136 std::mem::transmute(dl.symbol::<()>("init").unwrap())
141 let y = expr.kaas()?.test();
142 let loooooooooooooooooooooooooooooooooooooooooong =
143 does_this?.look?.good?.should_we_break?.after_the_first_question_mark?;
144 let yyyy = expr?.another?.another?.another?.another?.another?.another?.another?.another?.test();
145 let zzzz = expr?.another?.another?.another?.another?;
146 let aaa = x??????????????????????????????????????????????????????????????????????????;
149 .loooooooooooooooooooooooooooooooooooooong()
162 |tcx| tcx.lookup_item_type(def_id).generics)?;
163 fooooooooooooooooooooooooooo()?
165 .baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz()?;
170 ty::ImplOrTraitItem::MethodTraitItem(ref i) => write!(f, "{:?}", i),
171 ty::ImplOrTraitItem::ConstTraitItem(ref i) => write!(f, "{:?}", i),
172 ty::ImplOrTraitItem::TypeTraitItem(ref i) => write!(f, "{:?}", i),
175 ty::tls::with(|tcx| {
176 let tap = ty::Binder(TraitAndProjections(principal, projections));
177 in_binder(f, tcx, &ty::Binder(""), Some(tap))