From 7922e53afdd26affa68fc1b60bfe8800877d0f4d Mon Sep 17 00:00:00 2001 From: Will Crichton Date: Wed, 20 Mar 2024 22:23:43 -0700 Subject: [PATCH] Add multiline comment syntax. Fixes #171. --- src/ch03-04-comments.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ch03-04-comments.md b/src/ch03-04-comments.md index bfb0cfe177..48c9d3106d 100644 --- a/src/ch03-04-comments.md +++ b/src/ch03-04-comments.md @@ -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: Filename: src/main.rs