Beginner rustdoc

The simple Rust project below does not generate any documentation for the //. comments with cargo doc --open. Neither appear in the generated documentation. Any ideas?

//. A dot-comment comment

/// A threebar comment
fn main() {
	
    println!("Hello, world!");
    println!("I now exist in the GITHUB world. May 12, 2023  at 16_20_16_PM");
    println!("The 2nd commit: May 12, 2023  at 16_20_16_PM");
    println!("A commit on dev: May 13, 2023  at 12_27_43_PM");

}

pub fn a() {
//. A second dot-commment

}

//. doesn't mean anything special in Rust. It's just a comment that starts with ..

Doc comments start with /// or //! or /** or /*!.

https://doc.rust-lang.org/reference/comments.html#doc-comments

3 Likes

Bad eyesight! Argh. Thank you.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.