We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48ca6d1 commit d7b29a6Copy full SHA for d7b29a6
src/doc/guide.md
@@ -378,9 +378,15 @@ of your time with Rust.
378
The first thing we'll learn about are 'variable bindings.' They look like this:
379
380
```{rust}
381
-let x = 5i;
+fn main() {
382
+ let x = 5i;
383
+}
384
```
385
386
+Putting `fn main() {` in each example is a bit tedious, so we'll leave that out
387
+in the future. If you're following along, make sure to edit your `main()`
388
+function, rather than leaving it off. Otherwise, you'll get an error.
389
+
390
In many languages, this is called a 'variable.' But Rust's variable bindings
391
have a few tricks up their sleeves. Rust has a very powerful feature called
392
'pattern matching' that we'll get into detail with later, but the left
0 commit comments