Remove SyntaxContext from {ast, hir}::{GlobalAsm, InlineAsm}

We now store it in the `Span` of the expression or item.
This commit is contained in:
Matthew Jasper
2019-08-12 22:12:53 +01:00
parent f70c90c677
commit d04af194fc
10 changed files with 18 additions and 25 deletions

View File

@@ -30,7 +30,7 @@ pub fn expand_global_asm<'cx>(cx: &'cx mut ExtCtxt<'_>,
id: ast::DUMMY_NODE_ID,
node: ast::ItemKind::GlobalAsm(P(global_asm)),
vis: respan(sp.shrink_to_lo(), ast::VisibilityKind::Inherited),
span: sp,
span: sp.with_ctxt(cx.backtrace()),
tokens: None,
})])
}
@@ -61,8 +61,5 @@ fn parse_global_asm<'a>(
None => return Ok(None),
};
Ok(Some(ast::GlobalAsm {
asm,
ctxt: cx.backtrace(),
}))
Ok(Some(ast::GlobalAsm { asm }))
}