summaryrefslogtreecommitdiffstats
path: root/src/doc/book/redirects/comments.md
blob: d8e94f7e93863b0f69e52dd82d2a7e83e5c6115a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
% Comments

<small>There is a new edition of the book and this is an old link.</small>

> Comments must start with two slashes and continue until the end of the line.
> For comments that extend beyond a single line, you’ll need to include // on each line.

```rust
// So we’re doing something complicated here, long enough that we need
// multiple lines of comments to do it! Whew! Hopefully, this comment will
// explain what’s going on.
```

---

Here are the relevant sections in the new and old books:

* **[in the current edition: Ch 3.04 — Comments][2]**
* <small>[In the first edition: Ch 3.4 — Comments][1]</small>


[1]: https://doc.rust-lang.org/1.30.0/book/first-edition/comments.html
[2]: ch03-04-comments.html