Skip to content

Commit 1071dd9

Browse files
committed
Function definitions
Closes #39
1 parent 4f6d71f commit 1071dd9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Diff for: guide/items.md

+16
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,22 @@ The proper ordering and spacing is:
2828

2929
Avoid comments within the signature itself.
3030

31+
If the function signature does not fit on one line, then break after the opening
32+
parenthesis and before the closing parenthesis and put each argument on its own
33+
block-indented line. For example,
34+
35+
```rust
36+
fn foo(
37+
arg1: i32,
38+
arg2: i32,
39+
) -> i32 {
40+
...
41+
}
42+
```
43+
44+
Note the trailing comma on the last argument.
45+
46+
3147
### Tuples and tuple structs
3248

3349
Write the type list as you would a parameter list to a function.

0 commit comments

Comments
 (0)