summaryrefslogtreecommitdiff
path: root/exercises/variables/variables4.rs
blob: 33eca9e21884e7d35dbe3ae1c6ae35426ae00afa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// variables4.rs
// Make me compile! Scroll down for hints :)

// I AM NOT DONE

fn main() {
    let x: i32;
    println!("Number {}", x);
}

































// Oops! In this exercise, we have a variable binding that we've created on
// line 5, and we're trying to use it on line 6, but we haven't given it a
// value. We can't print out something that isn't there; try giving x a value!
// This is an error that can cause bugs that's very easy to make in any
// programming language -- thankfully the Rust compiler has caught this for us!