SHARE
TWEET

Untitled

a guest Mar 25th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #![allow(unreachable_code)]
  2.  
  3.  
  4. fn main() {
  5.     println!("{:?}", {
  6.         use serde::*; let t: Box<Serialize> = unsafe { std::mem::uninitialized() }; 0
  7.     });
  8. }
  9.  
  10.  
  11. /* ~~~~=== stderr ===~~~~
  12.    Compiling playground v0.0.1 (/playground)
  13. error[E0038]: the trait `serde::ser::Serialize` cannot be made into an object
  14.  --> src/main.rs:6:30
  15.   |
  16. 6 |         use serde::*; let t: Box<Serialize> = unsafe { std::mem::uninitialized() }; 0
  17.   |                              ^^^^^^^^^^^^^^ the trait `serde::ser::Serialize` cannot be made into an object
  18.   |
  19.   = note: method `serialize` has generic type parameters
  20.  
  21. error[E0038]: the trait `serde::ser::Serialize` cannot be made into an object
  22.  --> src/main.rs:6:56
  23.   |
  24. 6 |         use serde::*; let t: Box<Serialize> = unsafe { std::mem::uninitialized() }; 0
  25.   |                                                        ^^^^^^^^^^^^^^^^^^^^^^^ the trait `serde::ser::Serialize` cannot be made into an object
  26.   |
  27.   = note: method `serialize` has generic type parameters
  28.  
  29. error: aborting due to 2 previous errors
  30.  
  31. For more information about this error, try `rustc --explain E0038`.
  32. error: Could not compile `playground`.
  33.  
  34. To learn more, run the command again with --verbose.
  35.  
  36. */
  37.  
  38. /* ~~~~=== stdout ===~~~~
  39.  
  40. */
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top