This website requires JavaScript.
Explore
Help
Sign in
bjoernager
/
rust
Watch
1
Fork
You've already forked rust
0
Code
Activity
17d62bcb1d
rust
/
tests
/
ui
/
unsafe
/
unsafe-fn-assign-deref-ptr.rs
8 lines
107 B
Rust
Raw
Normal View
History
Unescape
Escape
move unsafety checking to MIR No functional changes intended.
2017-09-19 16:20:02 +03:00
fn
f
(
p
:
*
mut
u8
)
{
improve error message shown for unsafe operations: explain why undefined behavior could arise Inspired by @gnzlbg at https://github.com/rust-lang/rust/issues/46043#issuecomment-381544673
2018-07-10 10:52:05 +02:00
*
p
=
0
;
//~ ERROR dereference of raw pointer is unsafe
Convert ret to return
2012-08-01 17:30:05 -07:00
return
;
new test
2011-10-11 21:22:08 -07:00
}
fn
main
(
)
{
}
Copy permalink