Amanieu / thread_local-rs

Per-object thread-local storage for Rust
Apache License 2.0
328 stars 41 forks source link

1.1.5 doesn't compile on Rust 1.57 #46

Closed jcrevier closed 1 year ago

jcrevier commented 1 year ago

Attempting to compile thread local on Rust 1.57 results in the following compiler error:

error[E0658]: use of unstable library feature 'thread_local_const_init'
   --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/thread_local-1.1.5/src/thread_id.rs:130:9
    |
130 |         thread_local! { static THREAD: Cell<Option<Thread>> = const { Cell::new(None) }; }
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #84223 <https://github.com/rust-lang/rust/issues/84223> for more information
    = note: this error originates in the macro `$crate::__thread_local_inner` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0658`.
error: could not compile `thread_local` due to previous error

Not sure if this was intentional change to the MSRV or not. The README lists the MSRV as 1.36.0.

Amanieu commented 1 year ago

1.1.5 has been yanked due to another issue.

jcrevier commented 1 year ago

Closing as 1.1.5 has been yanked.

Amanieu commented 1 year ago

FYI the MSRV will be bumped to 1.59, which was released 11 months ago.