diff options
| author | bors <bors@rust-lang.org> | 2018-02-06 07:02:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-02-06 07:02:25 +0000 |
| commit | b224fc84e3438117b218ec6b57fdc3ea8a3d1c2e (patch) | |
| tree | fdea43c93e46ce70ebc3a9f102a0bfa37cd6e69b /src/libsyntax_ext | |
| parent | 6c04c41034c46730fba97bfe9cfa2dd0687c2a5f (diff) | |
| parent | 0553dc81d38cf7bd81334477b0338ef46da50e18 (diff) | |
| download | rust-b224fc84e3438117b218ec6b57fdc3ea8a3d1c2e.tar.gz rust-b224fc84e3438117b218ec6b57fdc3ea8a3d1c2e.zip | |
Auto merge of #48017 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests - Successful merges: #46030, #47496, #47543, #47704, #47753, #47807, #47948, #47959, #48003, #48007 - Failed merges:
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/asm.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax_ext/asm.rs b/src/libsyntax_ext/asm.rs index 3742fb8c804..d1de4dccd00 100644 --- a/src/libsyntax_ext/asm.rs +++ b/src/libsyntax_ext/asm.rs @@ -239,6 +239,12 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, } } + // If there are no outputs, the inline assembly is executed just for its side effects, + // so ensure that it is volatile + if outputs.is_empty() { + volatile = true; + } + MacEager::expr(P(ast::Expr { id: ast::DUMMY_NODE_ID, node: ast::ExprKind::InlineAsm(P(ast::InlineAsm { |
