Skip to content

Commit

Permalink
Auto merge of #18029 - lnicola:minor-stuff, r=lnicola
Browse files Browse the repository at this point in the history
minor: fix two nits
  • Loading branch information
bors committed Sep 2, 2024
2 parents 090a38c + 2f8ef4c commit c2f9b47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/crates/hir-ty/src/consteval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ pub(crate) fn const_eval_discriminant_variant(
}

let repr = db.enum_data(loc.parent).repr;
let is_signed = repr.and_then(|repr| repr.int).is_none_or(|int| int.is_signed());
let is_signed = IsNoneOr::is_none_or(repr.and_then(|repr| repr.int), |int| int.is_signed());

let mir_body = db.monomorphized_mir_body(
def,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,9 @@ pub(crate) fn toggle_macro_delimiter(acc: &mut Assists, ctx: &AssistContext<'_>)
acc.add(
AssistId("toggle_macro_delimiter", AssistKind::Refactor),
match token {
MacroDelims::LPar => "Replace delimiters with braces",
MacroDelims::RPar => "Replace delimiters with braces",
MacroDelims::LBra => "Replace delimiters with parentheses",
MacroDelims::RBra => "Replace delimiters with parentheses",
MacroDelims::LCur => "Replace delimiters with brackets",
MacroDelims::RCur => "Replace delimiters with brackets",
MacroDelims::LPar | MacroDelims::RPar => "Replace delimiters with braces",
MacroDelims::LBra | MacroDelims::RBra => "Replace delimiters with parentheses",
MacroDelims::LCur | MacroDelims::RCur => "Replace delimiters with brackets",
},
token_tree.syntax().text_range(),
|builder| {
Expand Down

0 comments on commit c2f9b47

Please sign in to comment.