Module rustc::middle::trans::expr[src]

Translation of Expressions

Public entry points:

See doc.rs for more comments.

Enums

Dest
cast_kind

Functions

cast_type_kind
trans

Translates an expression, returning a datum (and new block) encapsulating the result. When possible, it is preferred to use trans_into, as that may avoid creating a temporary on the stack.

trans_into

This function is equivalent to trans(bcx, expr).store_to_dest(dest) but it may generate better optimized LLVM code.

trans_local_var

Translates a reference to a local variable or argument. This always results in an lvalue datum.

trans_to_lvalue

Translates an expression in "lvalue" mode -- meaning that it returns a reference to the memory that the expr represents.

with_field_tys

Helper for enumerating the field types of structs, enums, or records. The optional node ID here is the node ID of the path identifying the enum variant in use. If none, this cannot possibly an enum variant (so, if it is and node_id_opt is none, this function fails).