summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/multi_assignments.txt
blob: ed1f1b420cbd3363ef19d48ba1f76c862c0a5d0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
### What it does
Checks for nested assignments.

### Why is this bad?
While this is in most cases already a type mismatch,
the result of an assignment being `()` can throw off people coming from languages like python or C,
where such assignments return a copy of the assigned value.

### Example
```
a = b = 42;
```
Use instead:
```
b = 42;
a = b;
```