]> git.lizzy.rs Git - rust.git/blob - src/docs/unit_arg.txt
Auto merge of #9425 - kraktus:patch-1, r=xFrednet
[rust.git] / src / docs / unit_arg.txt
1 ### What it does
2 Checks for passing a unit value as an argument to a function without using a
3 unit literal (`()`).
4
5 ### Why is this bad?
6 This is likely the result of an accidental semicolon.
7
8 ### Example
9 ```
10 foo({
11     let a = bar();
12     baz(a);
13 })
14 ```