-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gmtime and localtime aren't thread-safe so using them is unsound #12693
Comments
This is only the case for mingw32. |
cc #10480. We really want to decouple the datetime routines from the global states except when it is absolutely required (retrieving the current timezone, for example). |
As I know, gmtime and localtime are thread-safe on Windows(Microsoft) because such functions use static output area per thread. |
The relevant code is |
#21391 removed time wrappers. Fixed! |
…ass_by_ref_mut, r=Manishearth Emit the `needless_pass_by_ref_mut` lint on `self` arguments as well Fixes rust-lang/rust-clippy#12589. Fixes rust-lang/rust-clippy#9591. The first commit fixes a bug I uncovered while working on this: sometimes, the mutable borrow "event" happens before the alias one, which makes some argument detected as not used mutably even if they are. The fix was simply to fill the map with the aliases afterwards. The second commit removes the restriction to not run `self` argument for the `needless_pass_by_ref_mut` lint. changelog: emit the `needless_pass_by_ref_mut` lint on `self` arguments as well r? `@Manishearth`
It's unclear if these wrappers in rust_builtin.c are actually used anywhere, but the code should be removed either way.
The text was updated successfully, but these errors were encountered: