mirror of
https://github.com/gnu4cn/rust-lang-zh_CN.git
synced 2026-08-22 06:03:27 +08:00
Refining Ch03.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
fn main() {
|
||||
let guess = "42".parse().expect("这不是个数字!");
|
||||
let c = 'z';
|
||||
let z: char = 'ℤ'; // 带有显式的类型注解
|
||||
let heart_eyed_cat = '😻';
|
||||
|
||||
println! ("c 为 {c}, z 为 {z}, 爱心猫{heart_eyed_cat}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user