Closed
Description
Given the following code: link
fn main() {
let x = not 123;
}
The current output is:
Compiling playground v0.0.1 (/playground)
error: unexpected `123` after identifier
--> src/main.rs:2:17
|
2 | let x = not 123;
| ----^^^
| |
| help: use `!` to perform logical negation
error: could not compile `playground` due to previous error
The above phrasing AFAIK should say "bitwise not" instead of "logical negation" as the above literal is not interpreted as a Boolean.
The following shows a slightly different input and output which has the right phrasing: link
fn main() {
let x = ~ 123;
}
Compiling playground v0.0.1 (/playground)
error: `~` cannot be used as a unary operator
--> src/main.rs:2:13
|
2 | let x = ~ 123;
| ^ help: use `!` to perform bitwise not
error: could not compile `playground` due to previous error
Thanks a lot.