Skip to content

book: mention the existence of block comments in passing #28411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/doc/trpl/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ let x = 5; // this is also a line comment.
// If you have a long explanation for something, you can put line comments next
// to each other. Put a space between the // and your comment so that it’s
// more readable.

/*
* (Block comments delimited by `/*` and `*/` are also available, but this
* style is generally discouraged.)
*/
```

The other kind of comment is a doc comment. Doc comments use `///` instead of
Expand Down