/* at the beginning and */ at the end, allowing the enclosed text to span multiple lines or be embedded directly within a single statement.
Standard Syntax
The lexer strips the comment and treats everything between the opening and closing delimiters as whitespace before parsing begins.
/* found within an existing block comment requires a corresponding closing */ before the outermost comment is considered terminated. This prevents premature termination when commenting out blocks of code that already contain block comments.
#[doc] attributes.
- Outer block doc comment (
/** ... */): Applies to the item immediately following it. Parses as#[doc = "..."]. - Inner block doc comment (
/*! ... */): Applies to the enclosing item (such as a module, crate, or function). Parses as#![doc = "..."].
Tired of Poor Rust Skills? Fix That With Deep Grasping!Learn More





