Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait Trait {}
- // Make sure casts between thin-pointer <-> fat pointer obey RFC401
- fn main() {
- let a: *mut (dyn Trait + 'static) = 0 as *mut _; //~ ERROR casting
- let b: *const str = 0 as *const str; //~ ERROR casting
- let x: *mut (dyn Trait + 'static) = std::ptr::null_mut();
- let y: *const str = std::ptr::null();
- //~^ ERROR the size for values of type `str` cannot be known at compilation time
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement