An expression evaluates as a value and can be one of:
A call to a function.
A call to a macro.
A code block.
An
if/elsestatement.A
matchstatement.A
loopstatement.
Here is an example in the case of a code block denoted by curly brackets. The last statement does not end with a semicolon, as it is the way in Rust to mark a return value:
let y = {
let x = 1;
x + 5
};
y6