]> git.lizzy.rs Git - rust.git/blob - src/docs/duplicate_underscore_argument.txt
[Arithmetic] Consider literals
[rust.git] / src / docs / duplicate_underscore_argument.txt
1 ### What it does
2 Checks for function arguments having the similar names
3 differing by an underscore.
4
5 ### Why is this bad?
6 It affects code readability.
7
8 ### Example
9 ```
10 fn foo(a: i32, _a: i32) {}
11 ```
12
13 Use instead:
14 ```
15 fn bar(a: i32, _b: i32) {}
16 ```