continue to annotate functions as unsafe where neccessary
This commit is contained in:
parent
f2cd33df72
commit
85da98db4a
6 changed files with 22 additions and 23 deletions
|
|
@ -5,7 +5,7 @@ import std::unsafe;
|
|||
type pair = {mutable fst: int, mutable snd: int};
|
||||
|
||||
#[test]
|
||||
fn test() {
|
||||
fn test() unsafe {
|
||||
let p = {mutable fst: 10, mutable snd: 20};
|
||||
let pptr: *mutable pair = ptr::addr_of(p);
|
||||
let iptr: *mutable int = unsafe::reinterpret_cast(pptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue