Skip to content

Commit

Permalink
format cond
Browse files Browse the repository at this point in the history
  • Loading branch information
TaKO8Ki committed Apr 4, 2022
1 parent e0919de commit a56f214
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compiler/rustc_resolve/src/late.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2296,14 +2296,16 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {

let prev = self.diagnostic_metadata.current_block_could_be_bare_struct_literal.take();
if let (true, [Stmt { kind: StmtKind::Expr(expr), .. }]) =
(block.could_be_bare_literal, &block.stmts[..]) && let ExprKind::Type(..) = expr.kind
(block.could_be_bare_literal, &block.stmts[..])
&& let ExprKind::Type(..) = expr.kind
{
self.diagnostic_metadata.current_block_could_be_bare_struct_literal =
Some(block.span);
}
// Descend into the block.
for stmt in &block.stmts {
if let StmtKind::Item(ref item) = stmt.kind && let ItemKind::MacroDef(..) = item.kind {
if let StmtKind::Item(ref item) = stmt.kind
&& let ItemKind::MacroDef(..) = item.kind {
num_macro_definition_ribs += 1;
let res = self.r.local_def_id(item.id).to_def_id();
self.ribs[ValueNS].push(Rib::new(MacroDefinition(res)));
Expand Down

0 comments on commit a56f214

Please sign in to comment.