11error[E0282]: type annotations needed
2- --> $DIR/call_method_unknown_pointee.rs:10 :23
2+ --> $DIR/call_method_unknown_pointee.rs:9 :23
33 |
44LL | let _a: i32 = (ptr as *const _).read();
55 | ^^^^^^^^^^^^^^^^^ ---- cannot call a method on a raw pointer with an unknown pointee type
66 | |
77 | cannot infer type
88
99error[E0282]: type annotations needed for `*const _`
10- --> $DIR/call_method_unknown_pointee.rs:12 :13
10+ --> $DIR/call_method_unknown_pointee.rs:17 :13
1111 |
1212LL | let b = ptr as *const _;
1313 | ^
@@ -21,25 +21,25 @@ LL | let b: *const _ = ptr as *const _;
2121 | ++++++++++
2222
2323error[E0282]: type annotations needed
24- --> $DIR/call_method_unknown_pointee.rs:21 :23
24+ --> $DIR/call_method_unknown_pointee.rs:27 :23
2525 |
26- LL | let _a : i32 = (ptr as *mut _).read();
26+ LL | let _c : i32 = (ptr as *mut _).read();
2727 | ^^^^^^^^^^^^^^^ ---- cannot call a method on a raw pointer with an unknown pointee type
2828 | |
2929 | cannot infer type
3030
3131error[E0282]: type annotations needed for `*mut _`
32- --> $DIR/call_method_unknown_pointee.rs:23 :13
32+ --> $DIR/call_method_unknown_pointee.rs:35 :13
3333 |
34- LL | let b = ptr as *mut _;
34+ LL | let d = ptr as *mut _;
3535 | ^
3636LL |
37- LL | b.write(10 );
38- | - ---- cannot call a method on a raw pointer with an unknown pointee type
37+ LL | let _d: u8 = d.read( );
38+ | ---- cannot call a method on a raw pointer with an unknown pointee type
3939 |
40- help: consider giving `b ` an explicit type, where the placeholders `_` are specified
40+ help: consider giving `d ` an explicit type, where the placeholders `_` are specified
4141 |
42- LL | let b : *mut _ = ptr as *mut _;
42+ LL | let d : *mut _ = ptr as *mut _;
4343 | ++++++++
4444
4545error: aborting due to 4 previous errors
0 commit comments