summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/needless_return.txt
blob: 48782cb0ca84dac7f4f65cfa0e71138d0ceaa531 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
### What it does
Checks for return statements at the end of a block.

### Why is this bad?
Removing the `return` and semicolon will make the code
more rusty.

### Example
```
fn foo(x: usize) -> usize {
    return x;
}
```
simplify to
```
fn foo(x: usize) -> usize {
    x
}
```