Comments
This lesson will teach you how to comment your code in Rust.
We'll cover the following
Comments are programmer readable instructions to help explain things about your code. The compiler ignores them.
Types of Comments in Rust
Rust has two types of comments that are commonly used:
Line Comments //
The comments followed by a double forward slash, //
, are known as line comments.
This is the most recommended style of comment for commenting a single line.
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy