auto merge of #13579 : hirschenberger/rust/lint_unsigned_negate, r=alexcrichton
See #11273 and #13318
This commit is contained in:
commit
e0d261e576
14 changed files with 58 additions and 3 deletions
|
|
@ -36,3 +36,14 @@ fn qux() {
|
|||
i += 1;
|
||||
}
|
||||
}
|
||||
|
||||
fn quy() {
|
||||
let i = -23u; //~ WARNING negation of unsigned int literal may be unintentional
|
||||
//~^ WARNING unused variable
|
||||
}
|
||||
|
||||
fn quz() {
|
||||
let i = 23u;
|
||||
let j = -i; //~ WARNING negation of unsigned int variable may be unintentional
|
||||
//~^ WARNING unused variable
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue