Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct F;
- impl F {
- fn foo(&self) -> *const Self {
- self as *const _
- }
- }
- impl Drop for F {
- fn drop(&mut self) {
- println!("destroy");
- }
- }
- fn bar(s: *const F) {
- println!("call");
- }
- fn main() {
- bar(F.foo());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement