rust/src/test/run-pass/cast-to-infer-ty.rs
2018-12-25 21:08:33 -07:00

8 lines
171 B
Rust

// Check that we allow a cast to `_` so long as the target type can be
// inferred elsewhere.
pub fn main() {
let i: *const i32 = 0 as _;
assert!(i.is_null());
}