Module body

Source
Expand description

Defines Body: a lowered representation of functions, statics and consts.

Structs§

Body
The body of an item (function, const etc.).
BodySourceMap
An item body together with the mapping from syntax nodes to HIR expression IDs. This is needed to go from e.g. a position in a file to the HIR expression containing it; but for type inference etc., we want to operate on a structure that is agnostic to the actual positions of expressions in the file, so that we don’t recompute types whenever some whitespace is typed.