1 // rustfmt-array_layout: Block
2 // rustfmt-fn_call_style: Block
3 // rustfmt-control_style: Rfc
4 // Test expressions with block formatting.
10 let foo = [a_long_name, a_very_lng_name, a_long_name];
91 test123: value_one_two_three_four,
97 let a = WeightedChoice::new(&mut [
98 Weighted { weight: x, item: 0 },
99 Weighted { weight: 1, item: 1 },
100 Weighted { weight: x, item: 2 },
101 Weighted { weight: 1, item: 3 },
105 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
106 yyyyyyyyyyyyyyyyyyyyyyyyyyy,
111 [1 + 3, 4, 5, 6, 7, 7, fncall::<Vec<_>>(3 - 1)]
114 fn function_calls() {
115 let items = itemize_list(
125 width: remaining_width,
144 width: remaining_width,
171 baz!(one_item_macro_which_is_also_loooooooooooooooooooooooooooooooooooooooooooooooong);
173 let _ = match option {
183 Some(p) => baz!(one_item_macro_as_expression_which_is_also_loooooooooooooooong),
189 .compare_exchandsfasdsdfgsdgsdfgsdfgsdfgsdfgsdfgfsfdsage_weak(
204 if real_total <= limit && !pre_line_comments &&
205 !items.into_iter().any(|item| item.as_ref().is_multiline())
207 DefinitiveListTactic::Horizontal
238 let opt = Some(Struct(
249 do_thing(x, |param| {
263 lllllllllong_argument_one,
264 lllllllllong_argument_two,
265 lllllllllllllllllllllllllllllong_argument_three,
272 pparam1param1param1param1param1param1param1param1param1param1aram1,
286 Some(x) => somefunc(anotherfunc(
296 Some(x) => (1, 2, |x| {
301 Some(x) => SomeStruct {
302 f1: long_argument_one,
303 f2: long_argument_two,
304 f3: long_argument_three,
306 None => Ok(SomeStruct {
307 f1: long_argument_one,
308 f2: long_argument_two,
309 f3: long_argument_three,
315 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
319 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,
330 /* This comment waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay too long to be kept on the same line */
333 this_last_arg_is_tooooooooooooooooooooooooooooooooo_long_to_be_kept_with_the_pre_comment,
338 let channel: &str = seq.next_element()?
339 .ok_or_else(|| de::Error::invalid_length(2, &self))?;