Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- const fn get_drop_glue<T>() -> fn(*const T) { std::mem::drop_in_place::<T> }
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error[E0465]: multiple rlib candidates for `debug_unreachable` found
- |
- note: candidate #1: /playground/target/debug/deps/libdebug_unreachable-03fa1af676fe0c8a.rlib
- note: candidate #2: /playground/target/debug/deps/libdebug_unreachable-ac0b7818575a5ebc.rlib
- error[E0425]: cannot find value `drop_in_place` in module `std::mem`
- --> src/main.rs:6:65
- |
- 6 | const fn get_drop_glue<T>() -> fn(*const T) { std::mem::drop_in_place::<T> }
- | ^^^^^^^^^^^^^ not found in `std::mem`
- help: possible candidates are found in other modules, you can import them into scope
- |
- 4 | use core::intrinsics::drop_in_place;
- |
- 4 | use core::ptr::drop_in_place;
- |
- 4 | use std::intrinsics::drop_in_place;
- |
- 4 | use std::ptr::drop_in_place;
- |
- error: aborting due to 2 previous errors
- Some errors occurred: E0425, E0465.
- For more information about an error, try `rustc --explain E0425`.
- 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