]> git.proxmox.com Git - rustc.git/blame - src/tools/rustfmt/tests/target/configs/indent_style/block_args.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / rustfmt / tests / target / configs / indent_style / block_args.rs
CommitLineData
f20569fa
XL
1// rustfmt-indent_style: Block
2// Function arguments layout
3
4fn lorem() {}
5
6fn lorem(ipsum: usize) {}
7
8fn lorem(
9 ipsum: usize,
10 dolor: usize,
11 sit: usize,
12 amet: usize,
13 consectetur: usize,
14 adipiscing: usize,
15 elit: usize,
16) {
17 // body
18}
19
20// #1441
21extern "system" {
22 pub fn GetConsoleHistoryInfo(
23 console_history_info: *mut ConsoleHistoryInfo,
24 ) -> Boooooooooooooool;
25}
26
27// rustfmt should not add trailing comma for variadic function. See #1623.
28extern "C" {
29 pub fn variadic_fn(
30 first_parameter: FirstParameterType,
31 second_parameter: SecondParameterType,
32 ...
33 );
34}
35
36// #1652
37fn deconstruct(
38 foo: Bar,
39) -> (
40 SocketAddr,
41 Header,
42 Method,
43 RequestUri,
44 HttpVersion,
45 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
46) {
47}