diff options
author | Maan2003 <[email protected]> | 2021-06-13 04:54:16 +0100 |
---|---|---|
committer | Maan2003 <[email protected]> | 2021-06-13 04:54:16 +0100 |
commit | c9b4ac5be4daaabc062ab1ee663eba8594750003 (patch) | |
tree | 6090c8c38c735875c916255920525cf5fff45c75 /crates/hir/src/lib.rs | |
parent | d6737e55fb49d286b5e646f57975b27b2c95ce92 (diff) |
clippy::redudant_borrow
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r-- | crates/hir/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 2468c0dc6..f6eb23262 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -1112,7 +1112,7 @@ impl Function { | |||
1112 | .collect(); | 1112 | .collect(); |
1113 | sink.push(MissingFields { | 1113 | sink.push(MissingFields { |
1114 | file: source_ptr.file_id, | 1114 | file: source_ptr.file_id, |
1115 | field_list_parent: AstPtr::new(&record_expr), | 1115 | field_list_parent: AstPtr::new(record_expr), |
1116 | field_list_parent_path: record_expr | 1116 | field_list_parent_path: record_expr |
1117 | .path() | 1117 | .path() |
1118 | .map(|path| AstPtr::new(&path)), | 1118 | .map(|path| AstPtr::new(&path)), |
@@ -2531,13 +2531,13 @@ impl Type { | |||
2531 | match ty.kind(&Interner) { | 2531 | match ty.kind(&Interner) { |
2532 | TyKind::Adt(_, substs) => { | 2532 | TyKind::Adt(_, substs) => { |
2533 | cb(type_.derived(ty.clone())); | 2533 | cb(type_.derived(ty.clone())); |
2534 | walk_substs(db, type_, &substs, cb); | 2534 | walk_substs(db, type_, substs, cb); |
2535 | } | 2535 | } |
2536 | TyKind::AssociatedType(_, substs) => { | 2536 | TyKind::AssociatedType(_, substs) => { |
2537 | if let Some(_) = ty.associated_type_parent_trait(db) { | 2537 | if let Some(_) = ty.associated_type_parent_trait(db) { |
2538 | cb(type_.derived(ty.clone())); | 2538 | cb(type_.derived(ty.clone())); |
2539 | } | 2539 | } |
2540 | walk_substs(db, type_, &substs, cb); | 2540 | walk_substs(db, type_, substs, cb); |
2541 | } | 2541 | } |
2542 | TyKind::OpaqueType(_, subst) => { | 2542 | TyKind::OpaqueType(_, subst) => { |
2543 | if let Some(bounds) = ty.impl_trait_bounds(db) { | 2543 | if let Some(bounds) = ty.impl_trait_bounds(db) { |
@@ -2577,7 +2577,7 @@ impl Type { | |||
2577 | TyKind::FnDef(_, substs) | 2577 | TyKind::FnDef(_, substs) |
2578 | | TyKind::Tuple(_, substs) | 2578 | | TyKind::Tuple(_, substs) |
2579 | | TyKind::Closure(.., substs) => { | 2579 | | TyKind::Closure(.., substs) => { |
2580 | walk_substs(db, type_, &substs, cb); | 2580 | walk_substs(db, type_, substs, cb); |
2581 | } | 2581 | } |
2582 | TyKind::Function(hir_ty::FnPointer { substitution, .. }) => { | 2582 | TyKind::Function(hir_ty::FnPointer { substitution, .. }) => { |
2583 | walk_substs(db, type_, &substitution.0, cb); | 2583 | walk_substs(db, type_, &substitution.0, cb); |