Created
December 7, 2013 23:01
-
-
Save agrif/7850921 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::util::Void; | |
| use std::ptr; | |
| type Type1 = Void; | |
| struct Type2; | |
| fn main() { | |
| let mut t1 : *Type1 = ptr::null(); | |
| let mut t2 : *Type2 = ptr::null(); | |
| println!("t1: {} t1 as *Void: {}", t1, t1.as_void_ptr()); | |
| println!("t2: {} t2 as *Void: {}", t2, t2.as_void_ptr()); | |
| } | |
| // t1: 0x0 t1 as *Void: 0x7fa394d4e068 | |
| // t2: 0x0 t2 as *Void: 0x7fa394d4e060 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment