1 // Test expressions with block formatting.
7 let foo = [a_long_name, a_very_lng_name, a_long_name];
43 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 7, 8, 9, 0, 1, 2, 3, 4, 5,
47 let y = [/* comment */ 1, 2 /* post comment */, 3];
51 test123: value_one_two_three_four,
57 let a = WeightedChoice::new(&mut [
58 Weighted { weight: x, item: 0 },
59 Weighted { weight: 1, item: 1 },
60 Weighted { weight: x, item: 2 },
61 Weighted { weight: 1, item: 3 },
65 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
66 yyyyyyyyyyyyyyyyyyyyyyyyyyy,
71 [1 + 3, 4, 5, 6, 7, 7, fncall::<Vec<_>>(3 - 1)]
75 let items = itemize_list(
79 |item| item.span.lo(),
80 |item| item.span.hi(),
85 width: remaining_width,
98 |item| item.span.lo(),
99 |item| item.span.hi(),
104 width: remaining_width,
116 do_not, add, trailing, commas, inside, of, function, like, macros, even, if_they, are, long
119 baz!(one_item_macro_which_is_also_loooooooooooooooooooooooooooooooooooooooooooooooong);
121 let _ = match option {
131 Some(p) => baz!(one_item_macro_as_expression_which_is_also_loooooooooooooooong),
137 .compare_exchandsfasdsdfgsdgsdfgsdfgsdfgsdfgsdfgfsfdsage_weak(
152 if real_total <= limit
153 && !pre_line_comments
154 && !items.into_iter().any(|item| item.as_ref().is_multiline())
156 DefinitiveListTactic::Horizontal
187 let opt = Some(Struct(
198 do_thing(x, |param| {
212 lllllllllong_argument_one,
213 lllllllllong_argument_two,
214 lllllllllllllllllllllllllllllong_argument_three,
221 pparam1param1param1param1param1param1param1param1param1param1aram1,
235 Some(x) => somefunc(anotherfunc(
245 Some(x) => (1, 2, |x| {
250 Some(x) => SomeStruct {
251 f1: long_argument_one,
252 f2: long_argument_two,
253 f3: long_argument_three,
255 None => Ok(SomeStruct {
256 f1: long_argument_one,
257 f2: long_argument_two,
258 f3: long_argument_three,
263 y => func(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx),
266 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,
277 /* This comment waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay too long to be kept on the same line */
280 this_last_arg_is_tooooooooooooooooooooooooooooooooo_long_to_be_kept_with_the_pre_comment,
286 // This describes the argument below.
288 // This describes the argument below.
290 // This describes the argument below. */
292 // This describes the argument below.
293 /* This comment waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay too long to be kept on the same line */
295 // This describes the argument below.
297 this_last_arg_is_tooooooooooooooooooooooooooooooooo_long_to_be_kept_with_the_pre_comment,
302 let channel: &str = seq
304 .ok_or_else(|| de::Error::invalid_length(2, &self))?;