Skip to content

Commit

Permalink
Add multiline comment syntax. Fixes #171.
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Mar 21, 2024
1 parent 95ba733 commit 7922e53
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ch03-04-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ single line, you’ll need to include `//` on each line, like this:
// explain what’s going on.
```

Or you can use the multiline comment syntax with `/*` and `*/`:

```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. */
```

Comments can also be placed at the end of lines containing code:

<span class="filename">Filename: src/main.rs</span>
Expand Down

0 comments on commit 7922e53

Please sign in to comment.