Skip to content

Commit

Permalink
core: Make intrinsics::init unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed May 9, 2013
1 parent f547a67 commit 646f16d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libcore/unstable/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ pub extern "rust-intrinsic" {

pub fn get_tydesc<T>() -> *();

pub fn init<T>() -> T;
/// init is unsafe because it returns a zeroed-out datum,
/// which is unsafe unless T is POD. We don't have a POD
/// kind yet. (See #4074)
pub unsafe fn init<T>() -> T;

#[cfg(not(stage0))]
pub unsafe fn uninit<T>() -> T;
Expand Down

0 comments on commit 646f16d

Please sign in to comment.