diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2019-08-12 22:12:53 +0100 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2019-08-17 09:12:32 +0100 |
| commit | d04af194fc24d4577a6e5eeb0b52f4358e17771f (patch) | |
| tree | 40cf54c2b2a619b0b05c7f5dbe683e21f72d04bc /src/libsyntax_ext | |
| parent | f70c90c677e98f5267cc7c66fadef76e269097cb (diff) | |
| download | rust-d04af194fc24d4577a6e5eeb0b52f4358e17771f.tar.gz rust-d04af194fc24d4577a6e5eeb0b52f4358e17771f.zip | |
Remove SyntaxContext from {ast, hir}::{GlobalAsm, InlineAsm}
We now store it in the `Span` of the expression or item.
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/asm.rs | 3 | ||||
| -rw-r--r-- | src/libsyntax_ext/global_asm.rs | 7 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/libsyntax_ext/asm.rs b/src/libsyntax_ext/asm.rs index 950166f9260..644a44f1989 100644 --- a/src/libsyntax_ext/asm.rs +++ b/src/libsyntax_ext/asm.rs @@ -63,7 +63,7 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt<'_>, MacEager::expr(P(ast::Expr { id: ast::DUMMY_NODE_ID, node: ast::ExprKind::InlineAsm(P(inline_asm)), - span: sp, + span: sp.with_ctxt(cx.backtrace()), attrs: ThinVec::new(), })) } @@ -277,6 +277,5 @@ fn parse_inline_asm<'a>( volatile, alignstack, dialect, - ctxt: cx.backtrace(), })) } diff --git a/src/libsyntax_ext/global_asm.rs b/src/libsyntax_ext/global_asm.rs index 112192fac5d..73ebeaec454 100644 --- a/src/libsyntax_ext/global_asm.rs +++ b/src/libsyntax_ext/global_asm.rs @@ -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 })) } |
