rust/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
377 B
Rust
Raw Normal View History

2020-07-02 05:32:12 +00:00
// run-rustfix
fn main() {
let _x = !1; //~ ERROR cannot be used as a unary operator
let _y = !1; //~ ERROR unexpected `1` after identifier
2022-09-15 14:39:16 +00:00
let _z = !false; //~ ERROR unexpected keyword `false` after identifier
let _a = !true; //~ ERROR unexpected keyword `true` after identifier
let v = 1 + 2;
let _v = !v; //~ ERROR unexpected `v` after identifier
2020-07-02 05:32:12 +00:00
}