Expressions and starting flow control in RBE

This commit is contained in:
2023-09-26 06:43:22 -04:00
parent 505e04613f
commit 7204f08177
7 changed files with 122 additions and 3 deletions
+25
View File
@@ -0,0 +1,25 @@
#[allow(path_statements)]
#[allow(unused_must_use)]
fn main() {
let x = 5;
x;
x + 1;
15;
let x = 5u32;
let y = {
let x_squared = x * x;
let x_cube = x_squared * x;
x_cube + x_squared + x
};
let z = {
2 * x;
};
println!("x is {:?}", x);
println!("y is {:?}", y);
println!("z is {:?}", z);
}