Apply suggestions from code review
(removing confusing comment from my test, since the comment reflects the bad undesirable behavior that is being fixed here.)
This commit is contained in:
parent
4742bbb48b
commit
0d073c9174
@ -15,9 +15,6 @@ fn main() {
|
|||||||
let u8_ptr: *const u8 = &val;
|
let u8_ptr: *const u8 = &val;
|
||||||
let _closure = || {
|
let _closure = || {
|
||||||
unsafe {
|
unsafe {
|
||||||
// Fails compilation with:
|
|
||||||
// error[E0133]: dereference of raw pointer is unsafe and
|
|
||||||
// requires unsafe function or block
|
|
||||||
let tmp = *u8_ptr;
|
let tmp = *u8_ptr;
|
||||||
tmp
|
tmp
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user