We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b21a6da commit 95f9e30Copy full SHA for 95f9e30
src/doc/trpl/variable-bindings.md
@@ -89,25 +89,7 @@ what you need, so it's not verboten.
89
90
Let's get back to bindings. Rust variable bindings have one more aspect that
91
differs from other languages: bindings are required to be initialized with a
92
-value before you're allowed to use them. If we try...
93
-
94
-```{ignore}
95
-let x;
96
-```
97
98
-...we'll get an error:
99
100
-```text
101
-src/main.rs:2:9: 2:10 error: unable to infer enough type information about `_`; type annotations required
102
-src/main.rs:2 let x;
103
- ^
104
105
106
-Giving it a type will compile, though:
107
108
-```{rust}
109
-let x: i32;
110
+value before you're allowed to use them.
111
112
Let's try it out. Change your `src/main.rs` file to look like this:
113
0 commit comments