Rollup merge of #31842 - dileepbapat:master, r=alexcrichton

I have made changes and built it after that. Please advise,

https://github.com/rust-lang/rust/issues/31820
This commit is contained in:
Manish Goregaokar
2016-02-25 04:21:10 +05:30
9 changed files with 28 additions and 42 deletions

View File

@@ -69,9 +69,8 @@ static mut DTORS: *mut Vec<(Key, Dtor)> = ptr::null_mut();
pub unsafe fn create(dtor: Option<Dtor>) -> Key {
let key = c::TlsAlloc();
assert!(key != c::TLS_OUT_OF_INDEXES);
match dtor {
Some(f) => register_dtor(key, f),
None => {}
if let Some(f) = dtor {
register_dtor(key, f);
}
return key;
}