Module rustc_trans::trans::exprExperimental [-]  [+] [src]

Translation of Expressions

Public entry points:

See doc.rs for more comments.

Reexports

pub use self::cast_kind::*;
pub use self::Dest::*;

Structs

StructBaseInfo

Information that trans_adt needs in order to fill in the fields of a struct copied from a base struct (e.g., from an expression like Foo { a: b, ..base }.

Enums

Dest
cast_kind

Functions

cast_type_kind
get_dataptr
get_len
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_adt

Constructs an ADT instance:

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 panics).