Rollup merge of #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](https://github.com/rust-lang/rust-analyzer/issues/16556#issuecomment-1944271716) for Rust Analyzer
This commit is contained in:
commit
15d9e2c0f1
1 changed files with 2 additions and 1 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue