box-o-sand/rustbyexample/variable_bindings/variable_bindings.rs

16 lines
341 B
Rust
Raw Normal View History

2021-09-29 15:35:26 +00:00
fn main() {
let an_integer = 1u32;
let a_boolean = true;
let unit = ();
let copied_integer = an_integer;
println!("An integer: {:?}", copied_integer);
println!("A boolean: {:?}", a_boolean);
println!("Meet the unit value: {:?}", unit);
let _unused_variable = 3u32;
let noisy_unused_variable = 2u32;
}