diff options
| author | Léo Lanteri Thauvin <leseulartichaut@gmail.com> | 2021-08-16 17:30:23 +0200 |
|---|---|---|
| committer | Léo Lanteri Thauvin <leseulartichaut@gmail.com> | 2021-08-25 20:24:39 +0200 |
| commit | 2b0c8fff8a04dd995db0afaafba2ad9a5eff6fc1 (patch) | |
| tree | 57eb0f1a236da2c1575f0824b4a67a0ccea87db4 /compiler/rustc_ast/src | |
| parent | fde1b76b4b1d0d84f5691f4785906b31bb91f38d (diff) | |
| download | rust-2b0c8fff8a04dd995db0afaafba2ad9a5eff6fc1.tar.gz rust-2b0c8fff8a04dd995db0afaafba2ad9a5eff6fc1.zip | |
Various pattern cleanups
Diffstat (limited to 'compiler/rustc_ast/src')
| -rw-r--r-- | compiler/rustc_ast/src/mut_visit.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_ast/src/visit.rs | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/compiler/rustc_ast/src/mut_visit.rs b/compiler/rustc_ast/src/mut_visit.rs index c8245831187..fb4db6005ac 100644 --- a/compiler/rustc_ast/src/mut_visit.rs +++ b/compiler/rustc_ast/src/mut_visit.rs @@ -1179,13 +1179,10 @@ fn noop_visit_inline_asm<T: MutVisitor>(asm: &mut InlineAsm, vis: &mut T) { for (op, _) in &mut asm.operands { match op { InlineAsmOperand::In { expr, .. } + | InlineAsmOperand::Out { expr: Some(expr), .. } | InlineAsmOperand::InOut { expr, .. } | InlineAsmOperand::Sym { expr, .. } => vis.visit_expr(expr), - InlineAsmOperand::Out { expr, .. } => { - if let Some(expr) = expr { - vis.visit_expr(expr); - } - } + InlineAsmOperand::Out { expr: None, .. } => {} InlineAsmOperand::SplitInOut { in_expr, out_expr, .. } => { vis.visit_expr(in_expr); if let Some(out_expr) = out_expr { diff --git a/compiler/rustc_ast/src/visit.rs b/compiler/rustc_ast/src/visit.rs index a377763983a..cc699b237c2 100644 --- a/compiler/rustc_ast/src/visit.rs +++ b/compiler/rustc_ast/src/visit.rs @@ -714,13 +714,10 @@ fn walk_inline_asm<'a, V: Visitor<'a>>(visitor: &mut V, asm: &'a InlineAsm) { for (op, _) in &asm.operands { match op { InlineAsmOperand::In { expr, .. } + | InlineAsmOperand::Out { expr: Some(expr), .. } | InlineAsmOperand::InOut { expr, .. } | InlineAsmOperand::Sym { expr, .. } => visitor.visit_expr(expr), - InlineAsmOperand::Out { expr, .. } => { - if let Some(expr) = expr { - visitor.visit_expr(expr); - } - } + InlineAsmOperand::Out { expr: None, .. } => {} InlineAsmOperand::SplitInOut { in_expr, out_expr, .. } => { visitor.visit_expr(in_expr); if let Some(out_expr) = out_expr { |
