mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-03 05:13:35 +00:00
minor: New clippy lints
This commit is contained in:
parent
6725e046df
commit
4b6007115a
92 changed files with 180 additions and 201 deletions
|
|
@ -390,7 +390,7 @@ fn expand_var(
|
|||
let mut span = id;
|
||||
marker(&mut span);
|
||||
let wrap_in_parens = !matches!(sub.flat_tokens(), [tt::TokenTree::Leaf(_)])
|
||||
&& sub.try_into_subtree().map_or(true, |it| {
|
||||
&& sub.try_into_subtree().is_none_or(|it| {
|
||||
it.top_subtree().delimiter.kind == tt::DelimiterKind::Invisible
|
||||
});
|
||||
if wrap_in_parens {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue