Retain assembly operands span when lowering AST to HIR
This commit is contained in:
parent
0f6f2d681b
commit
91fe548825
13 changed files with 18 additions and 20 deletions
|
@ -14,7 +14,7 @@ macro_rules! arena_types {
|
|||
// HIR types
|
||||
[few] hir_krate: rustc_hir::Crate<$tcx>,
|
||||
[] arm: rustc_hir::Arm<$tcx>,
|
||||
[] asm_operand: rustc_hir::InlineAsmOperand<$tcx>,
|
||||
[] asm_operand: (rustc_hir::InlineAsmOperand<$tcx>, Span),
|
||||
[] asm_template: rustc_ast::InlineAsmTemplatePiece,
|
||||
[] attribute: rustc_ast::Attribute,
|
||||
[] block: rustc_hir::Block<$tcx>,
|
||||
|
|
|
@ -2143,7 +2143,7 @@ impl<'hir> InlineAsmOperand<'hir> {
|
|||
#[derive(Debug, HashStable_Generic)]
|
||||
pub struct InlineAsm<'hir> {
|
||||
pub template: &'hir [InlineAsmTemplatePiece],
|
||||
pub operands: &'hir [InlineAsmOperand<'hir>],
|
||||
pub operands: &'hir [(InlineAsmOperand<'hir>, Span)],
|
||||
pub options: InlineAsmOptions,
|
||||
pub line_spans: &'hir [Span],
|
||||
}
|
||||
|
|
|
@ -1191,7 +1191,7 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr<'v>)
|
|||
walk_list!(visitor, visit_expr, optional_expression);
|
||||
}
|
||||
ExprKind::InlineAsm(ref asm) => {
|
||||
for op in asm.operands {
|
||||
for (op, _op_sp) in asm.operands {
|
||||
match op {
|
||||
InlineAsmOperand::In { expr, .. }
|
||||
| InlineAsmOperand::InOut { expr, .. }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue