mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
clippy::redudant_borrow
This commit is contained in:
parent
d6737e55fb
commit
c9b4ac5be4
114 changed files with 285 additions and 285 deletions
|
@ -238,7 +238,7 @@ impl<'a> TyLoweringContext<'a> {
|
|||
// away instead of two.
|
||||
let actual_opaque_type_data = self
|
||||
.with_debruijn(DebruijnIndex::INNERMOST, |ctx| {
|
||||
ctx.lower_impl_trait(&bounds)
|
||||
ctx.lower_impl_trait(bounds)
|
||||
});
|
||||
self.opaque_type_data.borrow_mut()[idx as usize] = actual_opaque_type_data;
|
||||
|
||||
|
@ -421,7 +421,7 @@ impl<'a> TyLoweringContext<'a> {
|
|||
let found = self
|
||||
.db
|
||||
.trait_data(trait_ref.hir_trait_id())
|
||||
.associated_type_by_name(&segment.name);
|
||||
.associated_type_by_name(segment.name);
|
||||
match found {
|
||||
Some(associated_ty) => {
|
||||
// FIXME handle type parameters on the segment
|
||||
|
@ -505,7 +505,7 @@ impl<'a> TyLoweringContext<'a> {
|
|||
pub(crate) fn lower_path(&self, path: &Path) -> (Ty, Option<TypeNs>) {
|
||||
// Resolve the path (in type namespace)
|
||||
if let Some(type_ref) = path.type_anchor() {
|
||||
let (ty, res) = self.lower_ty_ext(&type_ref);
|
||||
let (ty, res) = self.lower_ty_ext(type_ref);
|
||||
return self.lower_ty_relative_path(ty, res, path.segments());
|
||||
}
|
||||
let (resolution, remaining_index) =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue