about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-04-06 23:34:05 +0000
committerGitHub <noreply@github.com>2022-04-06 23:34:05 +0000
commit134dbc6104e906a14c331bda9a388eda1af92f2d (patch)
tree6d89e0fcae297f7173a2fc0f4768ebc668aa789f
parent5ac07a89efb0feeae656d0fa562a41c041add6e5 (diff)
parent3632d5946f1cac47b7cba646a83b64eb9da0f878 (diff)
downloadrust-134dbc6104e906a14c331bda9a388eda1af92f2d.tar.gz
rust-134dbc6104e906a14c331bda9a388eda1af92f2d.zip
Merge #11919
11919: minor: Remove pointless rebindings r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
-rw-r--r--crates/hir/src/source_analyzer.rs4
-rw-r--r--crates/hir_ty/src/lower.rs2
-rw-r--r--crates/ide/src/hover.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir/src/source_analyzer.rs b/crates/hir/src/source_analyzer.rs
index c9eb134e943..89ba16d0879 100644
--- a/crates/hir/src/source_analyzer.rs
+++ b/crates/hir/src/source_analyzer.rs
@@ -344,7 +344,7 @@ impl SourceAnalyzer {
             }
             None
         })();
-        if let resolved @ Some(_) = resolved {
+        if let Some(_) = resolved {
             return resolved;
         }
 
@@ -389,7 +389,7 @@ impl SourceAnalyzer {
             let builtin = name_ref.as_ref().and_then(|name_ref| {
                 BuiltinAttr::by_name(db, self.resolver.krate().into(), &name_ref.text())
             });
-            if let builtin @ Some(_) = builtin {
+            if let Some(_) = builtin {
                 return builtin.map(PathResolution::BuiltinAttr);
             }
             return match resolve_hir_path_as_macro(db, &self.resolver, &hir_path) {
diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs
index 81134f666b5..373196969a3 100644
--- a/crates/hir_ty/src/lower.rs
+++ b/crates/hir_ty/src/lower.rs
@@ -1046,7 +1046,7 @@ fn named_associated_type_shorthand_candidates<R>(
                 ),
                 _ => None,
             });
-            if let res @ Some(_) = res {
+            if let Some(_) = res {
                 return res;
             }
             // Handle `Self::Type` referring to own associated type in trait definitions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index 23b995dbb8c..ae9be8adbd2 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -152,7 +152,7 @@ pub(crate) fn hover(
         let res = descended
             .iter()
             .find_map(|token| hover_type_fallback(sema, config, token, &original_token));
-        if let res @ Some(_) = res {
+        if let Some(_) = res {
             return res;
         }
     }