Closed aumetra closed 1 month ago
The CI failures seem unrelated. Probably UI updates in the Rust compiler. Should I fix them in this PR or separately?
Thanks for the PR!
Of course, will do
It seems that the MSRV bump triggered a new clippy warning. Could you address that as well?
error: initializer for `thread_local` value can be made `const`
--> async-stream/src/yielder.rs:37:45
|
37 | thread_local!(static STORE: Cell<*mut ()> = Cell::new(ptr::null_mut()));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { Cell::new(ptr::null_mut()) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_thread_local
= note: `-D clippy::missing-const-for-thread-local` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::missing_const_for_thread_local)]`
I mean, I just allowed the clippy lint for now since the MSRV definitely doesn't have support for inline const
inline const in thread_local is special and is available since Rust 1.59: https://github.com/rust-lang/rust/pull/91355
Ah, interesting. Didn't know. Fixing it.
Published in 0.3.6.
This PR fixes the unsoundness reported in #106 and #107
cc @steffahn (for checking the fixes, whether they are actually correct)
Closes #106 Closes #107