|
| 1 | +error[E0425]: cannot find value `num` in this scope |
| 2 | + --> $DIR/ice-unwrap-probe-many-result-125876.rs:4:24 |
| 3 | + | |
| 4 | +LL | std::ptr::from_ref(num).cast_mut().as_deref(); |
| 5 | + | ^^^ not found in this scope |
| 6 | + |
| 7 | +warning: type annotations needed |
| 8 | + --> $DIR/ice-unwrap-probe-many-result-125876.rs:4:29 |
| 9 | + | |
| 10 | +LL | std::ptr::from_ref(num).cast_mut().as_deref(); |
| 11 | + | ^^^^^^^^ |
| 12 | + | |
| 13 | + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! |
| 14 | + = note: for more information, see issue #46906 <https://github.com./rust-lang/rust/issues/46906> |
| 15 | + = note: `#[warn(tyvar_behind_raw_pointer)]` on by default |
| 16 | + |
| 17 | +warning: type annotations needed |
| 18 | + --> $DIR/ice-unwrap-probe-many-result-125876.rs:4:40 |
| 19 | + | |
| 20 | +LL | std::ptr::from_ref(num).cast_mut().as_deref(); |
| 21 | + | ^^^^^^^^ |
| 22 | + | |
| 23 | + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! |
| 24 | + = note: for more information, see issue #46906 <https://github.com./rust-lang/rust/issues/46906> |
| 25 | + |
| 26 | +error[E0599]: no method named `as_deref` found for raw pointer `*mut _` in the current scope |
| 27 | + --> $DIR/ice-unwrap-probe-many-result-125876.rs:4:40 |
| 28 | + | |
| 29 | +LL | std::ptr::from_ref(num).cast_mut().as_deref(); |
| 30 | + | ^^^^^^^^ |
| 31 | + | |
| 32 | +help: there is a method `as_ref` with a similar name |
| 33 | + | |
| 34 | +LL | std::ptr::from_ref(num).cast_mut().as_ref(); |
| 35 | + | ~~~~~~ |
| 36 | + |
| 37 | +error: aborting due to 2 previous errors; 2 warnings emitted |
| 38 | + |
| 39 | +Some errors have detailed explanations: E0425, E0599. |
| 40 | +For more information about an error, try `rustc --explain E0425`. |
0 commit comments