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
|
@ -1683,12 +1683,16 @@ impl<'tcx> Liveness<'_, 'tcx> {
|
|||
opt_body: Option<&hir::Body<'_>>,
|
||||
) -> Vec<errors::UnusedVariableStringInterp> {
|
||||
let mut suggs = Vec::new();
|
||||
let Some(opt_body) = opt_body else { return suggs; };
|
||||
let Some(opt_body) = opt_body else {
|
||||
return suggs;
|
||||
};
|
||||
let mut visitor = CollectLitsVisitor { lit_exprs: vec![] };
|
||||
intravisit::walk_body(&mut visitor, opt_body);
|
||||
for lit_expr in visitor.lit_exprs {
|
||||
let hir::ExprKind::Lit(litx) = &lit_expr.kind else { continue };
|
||||
let rustc_ast::LitKind::Str(syb, _) = litx.node else{ continue; };
|
||||
let rustc_ast::LitKind::Str(syb, _) = litx.node else {
|
||||
continue;
|
||||
};
|
||||
let name_str: &str = syb.as_str();
|
||||
let name_pa = format!("{{{name}}}");
|
||||
if name_str.contains(&name_pa) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue