Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- use serde::*; let t: Box<Serialize> = unsafe { std::mem::uninitialized() }; 0
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error[E0038]: the trait `serde::ser::Serialize` cannot be made into an object
- --> src/main.rs:6:30
- |
- 6 | use serde::*; let t: Box<Serialize> = unsafe { std::mem::uninitialized() }; 0
- | ^^^^^^^^^^^^^^ the trait `serde::ser::Serialize` cannot be made into an object
- |
- = note: method `serialize` has generic type parameters
- error[E0038]: the trait `serde::ser::Serialize` cannot be made into an object
- --> src/main.rs:6:56
- |
- 6 | use serde::*; let t: Box<Serialize> = unsafe { std::mem::uninitialized() }; 0
- | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `serde::ser::Serialize` cannot be made into an object
- |
- = note: method `serialize` has generic type parameters
- error: aborting due to 2 previous errors
- For more information about this error, try `rustc --explain E0038`.
- 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