Rust comments

From wikinotes
Revision as of 20:59, 29 August 2021 by Will (talk | contribs) (Created page with "{{ TODO | verify and expand on doc comments }} <syntaxhighlight lang="rust"> // inline comment </syntaxhighlight> <syntaxhighlight lang="rust"> →‎multiline * comment: <...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

TODO:

verify and expand on doc comments

// inline comment
/* multiline
 * comment
 */
/// doc-comment for following item (ex: java style)
fn foo() {
    println!("hi")
}

fn foo() {
    //! doc-comment for enclosing item (ex: python style)
    println!("bye")
}