rust/tests/ui/cast/cast-to-infer-ty.rs

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

9 lines
184 B
Rust
Raw Normal View History

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