rust/src/test/ui/cast-to-infer-ty.rs
2019-07-27 18:56:16 +03:00

9 lines
183 B
Rust

// run-pass
// 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());
}