mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-12 13:49:19 +00:00
giving a varaible a type
This commit is contained in:
parent
dd23da3ff0
commit
fe71a45ad2
@ -2,7 +2,7 @@
|
||||
// Make me compile!
|
||||
// Execute `rustlings hint variables1` or use the `hint` watch subcommand for a hint.
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
|
||||
fn main() {
|
||||
let x = 5;
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// I AM NOT DONE
|
||||
|
||||
fn main() {
|
||||
let x;
|
||||
let x: i32 = 10;
|
||||
if x == 10 {
|
||||
println!("x is ten!");
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user