Skip to content

Commit

Permalink
Unrolled build for rust-lang#121098
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#121098 - ShoyuVanilla:thread-local-unnecessary-else, r=Nilstrieb

Remove unnecessary else block from `thread_local!` expanded code

Some expanded codes make ["unnecessary else block" warnings](rust-lang/rust-analyzer#16556 (comment)) for Rust Analyzer
  • Loading branch information
rust-timer authored Feb 15, 2024
2 parents bd6b336 + fa1e35c commit ce335f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/std/src/sys/pal/common/thread_local/fast_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ pub macro thread_local_inner {
if let $crate::option::Option::Some(init) = init {
if let $crate::option::Option::Some(value) = init.take() {
return value;
} else if $crate::cfg!(debug_assertions) {
}
if $crate::cfg!(debug_assertions) {
$crate::unreachable!("missing default value");
}
}
Expand Down

0 comments on commit ce335f1

Please sign in to comment.