Keep everything tidy.
This commit is contained in:
parent
5aa734d6a1
commit
7f500ab4c1
3 changed files with 10 additions and 11 deletions
|
@ -2303,7 +2303,7 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
|
|||
let region_lb = ty::re_scope(expr.id);
|
||||
instantiate_path(fcx, pth, tpt, expr.span, expr.id, region_lb);
|
||||
}
|
||||
ast::expr_inline_asm(*) => {
|
||||
ast::expr_inline_asm(*) => {
|
||||
fcx.require_unsafe(expr.span, ~"use of inline assembly");
|
||||
fcx.write_nil(id);
|
||||
}
|
||||
|
|
|
@ -600,7 +600,7 @@ pub enum expr_ {
|
|||
expr_again(Option<ident>),
|
||||
expr_ret(Option<@expr>),
|
||||
expr_log(log_level, @expr, @expr),
|
||||
|
||||
|
||||
/* asm, clobbers + constraints, volatile */
|
||||
expr_inline_asm(@~str, @~str, bool),
|
||||
|
||||
|
|
|
@ -55,7 +55,6 @@ pub fn expand_asm(cx: ext_ctxt, sp: span, tts: &[ast::token_tree])
|
|||
|
||||
let mut state = Asm;
|
||||
loop outer: {
|
||||
|
||||
match state {
|
||||
Asm => {
|
||||
asm = expr_to_str(cx, p.parse_expr(),
|
||||
|
@ -65,11 +64,11 @@ pub fn expand_asm(cx: ext_ctxt, sp: span, tts: &[ast::token_tree])
|
|||
while *p.token != token::EOF &&
|
||||
*p.token != token::COLON &&
|
||||
*p.token != token::MOD_SEP {
|
||||
|
||||
|
||||
if outputs.len() != 0 {
|
||||
p.eat(&token::COMMA);
|
||||
}
|
||||
|
||||
|
||||
let constraint = p.parse_str();
|
||||
p.expect(&token::LPAREN);
|
||||
let out = p.parse_expr();
|
||||
|
@ -82,11 +81,11 @@ pub fn expand_asm(cx: ext_ctxt, sp: span, tts: &[ast::token_tree])
|
|||
while *p.token != token::EOF &&
|
||||
*p.token != token::COLON &&
|
||||
*p.token != token::MOD_SEP {
|
||||
|
||||
|
||||
if inputs.len() != 0 {
|
||||
p.eat(&token::COMMA);
|
||||
}
|
||||
|
||||
|
||||
let constraint = p.parse_str();
|
||||
p.expect(&token::LPAREN);
|
||||
let in = p.parse_expr();
|
||||
|
@ -100,11 +99,11 @@ pub fn expand_asm(cx: ext_ctxt, sp: span, tts: &[ast::token_tree])
|
|||
while *p.token != token::EOF &&
|
||||
*p.token != token::COLON &&
|
||||
*p.token != token::MOD_SEP {
|
||||
|
||||
|
||||
if clobs.len() != 0 {
|
||||
p.eat(&token::COMMA);
|
||||
}
|
||||
|
||||
|
||||
let clob = ~"~{" + *p.parse_str() + ~"}";
|
||||
clobs.push(clob);
|
||||
}
|
||||
|
@ -113,7 +112,7 @@ pub fn expand_asm(cx: ext_ctxt, sp: span, tts: &[ast::token_tree])
|
|||
}
|
||||
Options => {
|
||||
let option = *p.parse_str();
|
||||
|
||||
|
||||
if option == ~"volatile" {
|
||||
volatile = true;
|
||||
}
|
||||
|
@ -146,7 +145,7 @@ pub fn expand_asm(cx: ext_ctxt, sp: span, tts: &[ast::token_tree])
|
|||
} else if *p.token == token::EOF {
|
||||
break outer;
|
||||
} else {
|
||||
state
|
||||
state
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue