Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- &mut [1u8; 2] as *mut [u8] as *mut u8 as *mut [u8]
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error[E0607]: cannot cast thin pointer `*mut u8` to fat pointer `*mut [u8]`
- --> src/main.rs:6:9
- |
- 6 | &mut [1u8; 2] as *mut [u8] as *mut u8 as *mut [u8]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0607`.
- 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