Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- unsafe {std::mem::transmute""<(usize, usize)>(&mut [1u8; 2] as *mut [u8])}
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `""`
- --> src/main.rs:6:36
- |
- 6 | unsafe {std::mem::transmute""<(usize, usize)>(&mut [1u8; 2] as *mut [u8])}
- | ^^ expected one of 8 possible tokens here
- error[E0277]: `unsafe extern "rust-intrinsic" fn(_) -> _ {std::mem::transmute::<_, _>}` doesn't implement `std::fmt::Debug`
- --> src/main.rs:5:22
- |
- 5 | println!("{:?}", {
- | ______________________^
- 6 | | unsafe {std::mem::transmute""<(usize, usize)>(&mut [1u8; 2] as *mut [u8])}
- 7 | | });
- | |_____^ `unsafe extern "rust-intrinsic" fn(_) -> _ {std::mem::transmute::<_, _>}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
- |
- = help: the trait `std::fmt::Debug` is not implemented for `unsafe extern "rust-intrinsic" fn(_) -> _ {std::mem::transmute::<_, _>}`
- = note: required by `std::fmt::Debug::fmt`
- error: aborting due to 2 previous errors
- For more information about this error, try `rustc --explain E0277`.
- 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