mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-14 17:48:10 +00:00
Require unsafe block for inline assembly.
This commit is contained in:
parent
fc78b93c41
commit
bcc6c3e3db
@ -2303,7 +2303,10 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
|
|||||||
let region_lb = ty::re_scope(expr.id);
|
let region_lb = ty::re_scope(expr.id);
|
||||||
instantiate_path(fcx, pth, tpt, expr.span, expr.id, region_lb);
|
instantiate_path(fcx, pth, tpt, expr.span, expr.id, region_lb);
|
||||||
}
|
}
|
||||||
ast::expr_inline_asm(*) => { fcx.write_nil(id); }
|
ast::expr_inline_asm(*) => {
|
||||||
|
fcx.require_unsafe(expr.span, ~"use of inline assembly");
|
||||||
|
fcx.write_nil(id);
|
||||||
|
}
|
||||||
ast::expr_mac(_) => tcx.sess.bug(~"unexpanded macro"),
|
ast::expr_mac(_) => tcx.sess.bug(~"unexpanded macro"),
|
||||||
ast::expr_break(_) => { fcx.write_bot(id); bot = true; }
|
ast::expr_break(_) => { fcx.write_bot(id); bot = true; }
|
||||||
ast::expr_again(_) => { fcx.write_bot(id); bot = true; }
|
ast::expr_again(_) => { fcx.write_bot(id); bot = true; }
|
||||||
|
Loading…
Reference in New Issue
Block a user