This website requires JavaScript.
Explore
Help
Sign In
nordic-dev.net
/
rust
Watch
2
Star
0
Fork
0
You've already forked rust
mirror of
https://github.com/rust-lang/rust.git
synced
2025-05-01 20:47:36 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
901b340c1f
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 13:20:02 +00: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 08:52:05 +00:00
*
p
=
0
;
//~ ERROR dereference of raw pointer is unsafe
Convert ret to return
2012-08-02 00:30:05 +00:00
return
;
new test
2011-10-12 04:22:08 +00:00
}
fn
main
(
)
{
}
Reference in New Issue
Copy Permalink