Re-format let-else per rustfmt update

This commit is contained in:
Mark Rousskov
2023-07-12 21:49:27 -04:00
parent 67b0cfc761
commit cc907f80b9
162 changed files with 1404 additions and 947 deletions

View File

@@ -184,7 +184,9 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
}
// Error with the pattern
LookupResult::Exact(_) => {
let LookupResult::Parent(Some(mpi)) = self.move_data.rev_lookup.find(move_from.as_ref()) else {
let LookupResult::Parent(Some(mpi)) =
self.move_data.rev_lookup.find(move_from.as_ref())
else {
// move_from should be a projection from match_place.
unreachable!("Probably not unreachable...");
};
@@ -494,8 +496,10 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
if let LocalInfo::User(BindingForm::Var(VarBindingForm { pat_span, .. })) =
*bind_to.local_info()
{
let Ok(pat_snippet) =
self.infcx.tcx.sess.source_map().span_to_snippet(pat_span) else { continue; };
let Ok(pat_snippet) = self.infcx.tcx.sess.source_map().span_to_snippet(pat_span)
else {
continue;
};
let Some(stripped) = pat_snippet.strip_prefix('&') else {
suggestions.push((
bind_to.source_info.span.shrink_to_lo(),