/// Constructs an expression that calls an intrinsic
Constructs an expression that calls an intrinsic
Constructs an expression that calls an intrinsic
fn call_intrinsic(cx: &ExtCtxt,
                  span: Span,
                  intrinsic: &str,
                  args: Vec<P<ast::Expr>>)
                  -> P<ast::Expr> {
    let path = cx.std_path(&["intrinsics", intrinsic]);
    let call = cx.expr_call_global(span, path, args);
    cx.expr_block(P(ast::Block {
        stmts: vec![cx.stmt_expr(call)],
        id: ast::DUMMY_NODE_ID,
        rules: ast::BlockCheckMode::Unsafe(ast::CompilerGenerated),
        span: span,
    }))
}
fn call_intrinsic ( cx : & ExtCtxt , span : Span , intrinsic : & str , args : Vec < P < ast :: Expr > > ) -> P < ast :: Expr > { let path = cx . std_path ( & [ " " , intrinsic ] ) ; let call = cx . expr_call_global ( span , path , args ) ; cx . expr_block ( P ( ast :: Block { stmts : vec ! [ cx stmt_expr ( call ) ] , id : ast :: DUMMY_NODE_ID , rules : ast :: BlockCheckMode :: Unsafe ( ast :: CompilerGenerated ) , span : span , } ) ) }
Constructs an expression that calls an intrinsic
Constructs an expression that calls an intrinsic
cx
&ExtCtxt
span
Span
intrinsic
&str
args
Vec<P<ast::Expr>>