auto merge of #13579 : hirschenberger/rust/lint_unsigned_negate, r=alexcrichton

See #11273 and #13318
This commit is contained in:
bors 2014-05-02 16:51:50 -07:00
commit e0d261e576
14 changed files with 58 additions and 3 deletions

View file

@ -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
}