Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. #![allow(unreachable_code)]
  2.  
  3.  
  4. fn main() {
  5. println!("{:?}", {
  6. const fn get_drop_glue<T>() -> fn(*const T) { std::mem::drop_in_place::<T> }
  7. });
  8. }
  9.  
  10.  
  11. /* ~~~~=== stderr ===~~~~
  12. Compiling playground v0.0.1 (/playground)
  13. error[E0465]: multiple rlib candidates for `debug_unreachable` found
  14. |
  15. note: candidate #1: /playground/target/debug/deps/libdebug_unreachable-03fa1af676fe0c8a.rlib
  16. note: candidate #2: /playground/target/debug/deps/libdebug_unreachable-ac0b7818575a5ebc.rlib
  17.  
  18. error[E0425]: cannot find value `drop_in_place` in module `std::mem`
  19. --> src/main.rs:6:65
  20. |
  21. 6 | const fn get_drop_glue<T>() -> fn(*const T) { std::mem::drop_in_place::<T> }
  22. | ^^^^^^^^^^^^^ not found in `std::mem`
  23. help: possible candidates are found in other modules, you can import them into scope
  24. |
  25. 4 | use core::intrinsics::drop_in_place;
  26. |
  27. 4 | use core::ptr::drop_in_place;
  28. |
  29. 4 | use std::intrinsics::drop_in_place;
  30. |
  31. 4 | use std::ptr::drop_in_place;
  32. |
  33.  
  34. error: aborting due to 2 previous errors
  35.  
  36. Some errors occurred: E0425, E0465.
  37. For more information about an error, try `rustc --explain E0425`.
  38. error: Could not compile `playground`.
  39.  
  40. To learn more, run the command again with --verbose.
  41.  
  42. */
  43.  
  44. /* ~~~~=== stdout ===~~~~
  45.  
  46. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement