mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 01:17:27 +00:00
Merge #11919
11919: minor: Remove pointless rebindings r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
134dbc6104
3 changed files with 4 additions and 4 deletions
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue