Assign from a block
This commit is contained in:
parent
44afa4b13c
commit
093698d6d2
@ -1,10 +1,8 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
let y = {
|
||||
let x = 3;
|
||||
x + 1
|
||||
};
|
||||
|
||||
another_function(5, 6);
|
||||
}
|
||||
|
||||
fn another_function(x: i32, y: i32) {
|
||||
println!("The value of x is: {}", x);
|
||||
println!("The value of y is: {}", y);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user