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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user