I came across one of the example code in eframe
Rust GUI Library, and I wanted to know the name/term by which we refer to, when we use this feature of Rust.
I have coded a very simple example of the similar feature used in eframe library.
fn main() {
let mut var = 5;
let expr_var = {
let mutable_var = &mut var;
*mutable_var = 6;
(*mutable_var as f32) / 2.0
};
println!("{}", expr_var); // prints 3
}
Please explain me the term for this cool expression used for evaluating expr_var
. If possible, a link to the Rust documentation for this specific feature, will be really useful.
Thanks in advance for helping this beginner, who has just started learning Rust.