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
1 changed files with 0 additions and 3 deletions
|
|
@ -15,9 +15,6 @@ fn main() {
|
|||
let u8_ptr: *const u8 = &val;
|
||||
let _closure = || {
|
||||
unsafe {
|
||||
// Fails compilation with:
|
||||
// error[E0133]: dereference of raw pointer is unsafe and
|
||||
// requires unsafe function or block
|
||||
let tmp = *u8_ptr;
|
||||
tmp
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue