rust/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.rs

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

12 lines
524 B
Rust
Raw Normal View History

// Regression test for ICE #125876
fn main() {
std::ptr::from_ref(num).cast_mut().as_deref();
//~^ ERROR cannot find value `num` in this scope
//~| ERROR no method named `as_deref` found for raw pointer `*mut _` in the current scope
//~| WARN type annotations needed
//~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
//~| WARN type annotations needed
//~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
}