]> git.lizzy.rs Git - rust.git/blob - src/test/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.fixed
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[rust.git] / src / test / ui / did_you_mean / issue-41679-tilde-bitwise-negation-attempt.fixed
1 // run-rustfix
2
3 fn main() {
4     let _x = !1; //~ ERROR cannot be used as a unary operator
5     let _y = !1; //~ ERROR unexpected `1` after identifier
6     let _z = !false; //~ ERROR unexpected keyword `false` after identifier
7     let _a = !true; //~ ERROR unexpected keyword `true` after identifier
8     let v = 1 + 2;
9     let _v = !v; //~ ERROR unexpected `v` after identifier
10 }