about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-02 17:07:43 +0000
committerbors <bors@rust-lang.org>2024-09-02 17:07:43 +0000
commitc2f9b47c21bb8faaaee9eb3452c3f5723a2ba9b7 (patch)
treea0cdef5b6b04ad3e6d06ce9458bb6aa92421eea2
parent090a38cd94487d1808e1232b1d736047feb11d8d (diff)
parent2f8ef4c8878c1505b71973275532ef38288554be (diff)
downloadrust-c2f9b47c21bb8faaaee9eb3452c3f5723a2ba9b7.tar.gz
rust-c2f9b47c21bb8faaaee9eb3452c3f5723a2ba9b7.zip
Auto merge of #18029 - lnicola:minor-stuff, r=lnicola
minor: fix two nits
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/consteval.rs2
-rw-r--r--src/tools/rust-analyzer/crates/ide-assists/src/handlers/toggle_macro_delimiter.rs9
2 files changed, 4 insertions, 7 deletions
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/consteval.rs b/src/tools/rust-analyzer/crates/hir-ty/src/consteval.rs
index e5c493ac56e..968a828e9df 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/consteval.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/consteval.rs
@@ -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,
diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/toggle_macro_delimiter.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/toggle_macro_delimiter.rs
index eedb2ea3b9a..e452b5f7787 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/toggle_macro_delimiter.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/toggle_macro_delimiter.rs
@@ -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| {