TypedExpr
std::meta::typed_expr contains methods on the built-in TypedExpr type for resolved and type-checked expressions.
Methods
as_function_definition
as_function_definition
pub comptime fn as_function_definition(self) -> Option<FunctionDefinition> {}
If this expression refers to a function definition, returns it. Otherwise returns Option::none().
get_type
get_type
pub comptime fn get_type(self) -> Option<Type> {}
Returns the type of the expression, or Option::none() if there were errors when the expression was previously resolved.
location
location
pub comptime fn location(self) -> Location {}
Returns the source Location of this expression.
This can be passed to std::meta::error or std::meta::warn to attach a diagnostic to the expression.