RBE variable bindings
This commit is contained in:
parent
052fb87667
commit
eac3c2d8a6
2
rustbyexample/.gitignore
vendored
2
rustbyexample/.gitignore
vendored
@ -1,7 +1,9 @@
|
|||||||
/custom_types/*
|
/custom_types/*
|
||||||
/hello/*
|
/hello/*
|
||||||
/primitives/*
|
/primitives/*
|
||||||
|
/variable_bindings/*
|
||||||
|
|
||||||
!/custom_types/*.rs
|
!/custom_types/*.rs
|
||||||
!/hello/*.rs
|
!/hello/*.rs
|
||||||
!/primitives/*.rs
|
!/primitives/*.rs
|
||||||
|
!/variable_bindings/*.rs
|
||||||
|
15
rustbyexample/variable_bindings/variable_bindings.rs
Normal file
15
rustbyexample/variable_bindings/variable_bindings.rs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user