Skip to content

Commit 3adaa34

Browse files
authored
Update variables1.rs
1 parent 0a966a3 commit 3adaa34

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

exercises/variables/variables1.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
// variables1.rs
2-
//
3-
// Make me compile!
4-
//
5-
// Execute `rustlings hint variables1` or use the `hint` watch subcommand for a
6-
// hint.
7-
8-
91
fn main() {
2+
// 1. 定义变量x,绑定值5(Rust会自动推导x的类型为i32)
103
let x = 5;
4+
// 2. 打印变量x的值,{}是占位符,会被x的实际值替换
115
println!("x has the value {}", x);
126
}

0 commit comments

Comments
 (0)