rust/tests/ui/issues/issue-45730.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
271 B
Rust
Raw Normal View History

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