Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- let a: u32 = -1; a
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error[E0600]: cannot apply unary operator `-` to type `u32`
- --> src/main.rs:6:22
- |
- 6 | let a: u32 = -1; a
- | ^^ cannot apply unary operator `-`
- |
- = note: unsigned values cannot be negated
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0600`.
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement