fix some manual_map
This commit is contained in:
parent
dab76eccdf
commit
464f4057c2
@ -959,13 +959,9 @@ fn expected_fn_found_fn_mut_call(&self, err: &mut Diag<'_>, sp: Span, act: &str)
|
||||
None
|
||||
}
|
||||
}
|
||||
hir::ExprKind::MethodCall(_, _, args, span) => {
|
||||
if let Some(def_id) = typeck_results.type_dependent_def_id(*hir_id) {
|
||||
Some((def_id, *span, *args))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
hir::ExprKind::MethodCall(_, _, args, span) => typeck_results
|
||||
.type_dependent_def_id(*hir_id)
|
||||
.map(|def_id| (def_id, *span, *args)),
|
||||
_ => None,
|
||||
}
|
||||
};
|
||||
|
@ -537,7 +537,7 @@ fn visit_stmt(&mut self, ex: &'v hir::Stmt<'v>) -> Self::Result {
|
||||
&& binding_id != self.binding_id
|
||||
{
|
||||
if self.check_and_add_sugg_binding(LetStmt {
|
||||
ty_hir_id_opt: if let Some(ty) = ty { Some(ty.hir_id) } else { None },
|
||||
ty_hir_id_opt: ty.map(|ty| ty.hir_id),
|
||||
binding_id,
|
||||
span: pat.span,
|
||||
init_hir_id: init.hir_id,
|
||||
|
Loading…
Reference in New Issue
Block a user