This is an abomination, yet totally legal:
/**
* foo
*/
/// bar
#[doc="spam"]
mod m {
#[doc="eggs"];
//! baz
/*! qux */
}
fn main() {}
Putting aside the fact that we just have waay too many forms of doc comments, this should be a compile-time error. I can think of no scenario where you'd want to split an item's documentation up among several comments, let alone several different types of comments.
This is an abomination, yet totally legal:
Putting aside the fact that we just have waay too many forms of doc comments, this should be a compile-time error. I can think of no scenario where you'd want to split an item's documentation up among several comments, let alone several different types of comments.