Skip to content

Commit 1805e5f

Browse files
committed
Allow indirect operands to be used as inputs for inline asm
1 parent f18c905 commit 1805e5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libsyntax/ext/asm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
139139

140140
let (constraint, _str_style) = panictry!(p.parse_str());
141141

142-
if constraint.starts_with("=") {
142+
if constraint.starts_with("=") && !constraint.contains("*") {
143143
cx.span_err(p.last_span, "input operand constraint contains '='");
144-
} else if constraint.starts_with("+") {
144+
} else if constraint.starts_with("+") && !constraint.contains("*") {
145145
cx.span_err(p.last_span, "input operand constraint contains '+'");
146146
}
147147

0 commit comments

Comments
 (0)