Re-format let-else per rustfmt update
This commit is contained in:
parent
67b0cfc761
commit
cc907f80b9
162 changed files with 1404 additions and 947 deletions
|
@ -79,8 +79,7 @@ impl<'tcx> LateLintPass<'tcx> for NoopMethodCall {
|
|||
// We only care about method calls corresponding to the `Clone`, `Deref` and `Borrow`
|
||||
// traits and ignore any other method call.
|
||||
|
||||
let Some((DefKind::AssocFn, did)) =
|
||||
cx.typeck_results().type_dependent_def(expr.hir_id)
|
||||
let Some((DefKind::AssocFn, did)) = cx.typeck_results().type_dependent_def(expr.hir_id)
|
||||
else {
|
||||
return;
|
||||
};
|
||||
|
@ -98,9 +97,7 @@ impl<'tcx> LateLintPass<'tcx> for NoopMethodCall {
|
|||
.tcx
|
||||
.normalize_erasing_regions(cx.param_env, cx.typeck_results().node_substs(expr.hir_id));
|
||||
// Resolve the trait method instance.
|
||||
let Ok(Some(i)) = ty::Instance::resolve(cx.tcx, cx.param_env, did, substs) else {
|
||||
return
|
||||
};
|
||||
let Ok(Some(i)) = ty::Instance::resolve(cx.tcx, cx.param_env, did, substs) else { return };
|
||||
// (Re)check that it implements the noop diagnostic.
|
||||
let Some(name) = cx.tcx.get_diagnostic_name(i.def_id()) else { return };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue