常量是用const来定义
const HELLO_WORLD = "hello world"
变量是用let来定义
let man = "mac"
在变量中又分为不可变变量跟可变变量,区别如下
let man = "ricky"
let mut man = "ricky"
隐藏 -----修改不可变变量的方式
fn main() {
let x = 5;
let x = x + 1;
let x = x * 2;
println!("The value of x is: {}", x);
}