2017-11-03 16:58:01 +09:00
|
|
|
use std::fmt;
|
|
|
|
fn main() {
|
2017-11-20 13:13:27 +01:00
|
|
|
let x: *const _ = 0 as _; //~ ERROR cannot cast
|
2017-11-03 16:58:01 +09:00
|
|
|
|
2017-11-20 13:13:27 +01:00
|
|
|
let x: *const _ = 0 as *const _; //~ ERROR cannot cast
|
2019-05-28 14:46:13 -04:00
|
|
|
let y: Option<*const dyn fmt::Debug> = Some(x) as _;
|
2017-11-03 16:58:01 +09:00
|
|
|
|
2017-11-20 13:13:27 +01:00
|
|
|
let x = 0 as *const i32 as *const _ as *mut _; //~ ERROR cannot cast
|
2017-11-03 16:58:01 +09:00
|
|
|
}
|