]> git.lizzy.rs Git - rust.git/blob - src/docs/suspicious_unary_op_formatting.txt
Rollup merge of #104595 - compiler-errors:poly-existential-predicate, r=lcnr
[rust.git] / src / docs / suspicious_unary_op_formatting.txt
1 ### What it does
2 Checks the formatting of a unary operator on the right hand side
3 of a binary operator. It lints if there is no space between the binary and unary operators,
4 but there is a space between the unary and its operand.
5
6 ### Why is this bad?
7 This is either a typo in the binary operator or confusing.
8
9 ### Example
10 ```
11 // &&! looks like a different operator
12 if foo &&! bar {}
13 ```
14
15 Use instead:
16 ```
17 if foo && !bar {}
18 ```