2 ms·
It’s a little similar, except that these are attributes rather than comments. They’re part of the syntax of the language, and new macros can be written to add n
by db48x 5y ago
It’s a little similar, except that these are attributes rather than comments. They’re part of the syntax of the language, and new macros can be written to add new attributes. Attributes are used for several different purposes within the language, so using them is familiar and common.
Rust also has two kinds of comments, one that shows up in the generated documentation and one that doesn’t.