Skip to content

Add example to comment.md to teach how to toggle a whole code block using block comments #1919

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KennedyRichard
Copy link

Block comments allow people to uncomment/comment a whole code block by adding/removing a single '/' character.

None of the existing examples clearly demonstrates this ability, so I thought it'd be useful to do so here.

The chapter is already very small, so adding a few extra lines should be acceptable.

I actually learned this from Haskell, although I don't use it as often as Rust.

Toggling an entire code block by adding/removing a single character seems very, very useful, so I think it is worth teaching it to users and it deserves a prominent spot in this popular learning resource.

Block comments allow people to uncomment/comment a whole code block by adding/removing a single '/' character.

None of the existing examples clearly demonstrates this ability, so I thought it'd be useful to do so here.

The chapter is already very small, so adding a few extra lines should be acceptable.
@rustbot
Copy link
Collaborator

rustbot commented Apr 6, 2025

r? @marioidival

rustbot has assigned @marioidival.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants