mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
clippy::redudant_borrow
This commit is contained in:
parent
d6737e55fb
commit
c9b4ac5be4
114 changed files with 285 additions and 285 deletions
|
@ -1112,7 +1112,7 @@ impl Function {
|
|||
.collect();
|
||||
sink.push(MissingFields {
|
||||
file: source_ptr.file_id,
|
||||
field_list_parent: AstPtr::new(&record_expr),
|
||||
field_list_parent: AstPtr::new(record_expr),
|
||||
field_list_parent_path: record_expr
|
||||
.path()
|
||||
.map(|path| AstPtr::new(&path)),
|
||||
|
@ -2531,13 +2531,13 @@ impl Type {
|
|||
match ty.kind(&Interner) {
|
||||
TyKind::Adt(_, substs) => {
|
||||
cb(type_.derived(ty.clone()));
|
||||
walk_substs(db, type_, &substs, cb);
|
||||
walk_substs(db, type_, substs, cb);
|
||||
}
|
||||
TyKind::AssociatedType(_, substs) => {
|
||||
if let Some(_) = ty.associated_type_parent_trait(db) {
|
||||
cb(type_.derived(ty.clone()));
|
||||
}
|
||||
walk_substs(db, type_, &substs, cb);
|
||||
walk_substs(db, type_, substs, cb);
|
||||
}
|
||||
TyKind::OpaqueType(_, subst) => {
|
||||
if let Some(bounds) = ty.impl_trait_bounds(db) {
|
||||
|
@ -2577,7 +2577,7 @@ impl Type {
|
|||
TyKind::FnDef(_, substs)
|
||||
| TyKind::Tuple(_, substs)
|
||||
| TyKind::Closure(.., substs) => {
|
||||
walk_substs(db, type_, &substs, cb);
|
||||
walk_substs(db, type_, substs, cb);
|
||||
}
|
||||
TyKind::Function(hir_ty::FnPointer { substitution, .. }) => {
|
||||
walk_substs(db, type_, &substitution.0, cb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue