continue to annotate functions as unsafe where neccessary

This commit is contained in:
Niko Matsakis 2011-10-10 15:16:55 -07:00 committed by Brian Anderson
parent f2cd33df72
commit 85da98db4a
6 changed files with 22 additions and 23 deletions

View file

@ -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);