-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
thread_local_initializer_can_be_made_const should respect MSRV #12404
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Comments
taiki-e
added a commit
to taiki-e/pin-project
that referenced
this issue
Mar 3, 2024
bors
added a commit
that referenced
this issue
Mar 3, 2024
Added msrv to threadlocal initializer check closes: #12404
taiki-e
added a commit
to taiki-e/portable-atomic
that referenced
this issue
Mar 5, 2024
hkratz
added a commit
to hkratz/futures-rs
that referenced
this issue
Sep 14, 2024
hkratz
added a commit
to hkratz/futures-rs
that referenced
this issue
Sep 14, 2024
hkratz
added a commit
to hkratz/futures-rs
that referenced
this issue
Sep 14, 2024
taiki-e
pushed a commit
to rust-lang/futures-rs
that referenced
this issue
Sep 14, 2024
* Fix unexpected `cfg` condition name: ... warnings introduced in Rust 1.80 See https://blog.rust-lang.org/2024/05/06/check-cfg.html * io_slice_advance feature is now stable * clippy: enable missing_const_for_thread_local lint, now checks for MSRV (see rust-lang/rust-clippy#12404) * clippy: fixes for "doc list item without indentation" lint * clippy: ignore incorrect "first doc comment paragraph is too long" warning see rust-lang/rust-clippy#13315 * clippy: allow long first paragraphs in select... fn doc comments * use workspace level setting to ignore error about the futures_sanitizer unexpected config
taiki-e
pushed a commit
to rust-lang/futures-rs
that referenced
this issue
Oct 5, 2024
* Fix unexpected `cfg` condition name: ... warnings introduced in Rust 1.80 See https://blog.rust-lang.org/2024/05/06/check-cfg.html * io_slice_advance feature is now stable * clippy: enable missing_const_for_thread_local lint, now checks for MSRV (see rust-lang/rust-clippy#12404) * clippy: fixes for "doc list item without indentation" lint * clippy: ignore incorrect "first doc comment paragraph is too long" warning see rust-lang/rust-clippy#13315 * clippy: allow long first paragraphs in select... fn doc comments * use workspace level setting to ignore error about the futures_sanitizer unexpected config
taiki-e
pushed a commit
to rust-lang/futures-rs
that referenced
this issue
Oct 5, 2024
* Fix unexpected `cfg` condition name: ... warnings introduced in Rust 1.80 See https://blog.rust-lang.org/2024/05/06/check-cfg.html * io_slice_advance feature is now stable * clippy: enable missing_const_for_thread_local lint, now checks for MSRV (see rust-lang/rust-clippy#12404) * clippy: fixes for "doc list item without indentation" lint * clippy: ignore incorrect "first doc comment paragraph is too long" warning see rust-lang/rust-clippy#13315 * clippy: allow long first paragraphs in select... fn doc comments * use workspace level setting to ignore error about the futures_sanitizer unexpected config
taiki-e
pushed a commit
to rust-lang/futures-rs
that referenced
this issue
Oct 5, 2024
* Fix unexpected `cfg` condition name: ... warnings introduced in Rust 1.80 See https://blog.rust-lang.org/2024/05/06/check-cfg.html * io_slice_advance feature is now stable * clippy: enable missing_const_for_thread_local lint, now checks for MSRV (see rust-lang/rust-clippy#12404) * clippy: fixes for "doc list item without indentation" lint * clippy: ignore incorrect "first doc comment paragraph is too long" warning see rust-lang/rust-clippy#13315 * clippy: allow long first paragraphs in select... fn doc comments * use workspace level setting to ignore error about the futures_sanitizer unexpected config
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
thread_local_const_init has been stabilized in 1.59 (rust-lang/rust#91355), but this lint is also triggered for code with MSRV less than 1.59.
Mentioning @partiallytyped, who implemented this lint in #12026.
Lint Name
thread_local_initializer_can_be_made_const
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen: no warning
playground
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: