You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While documenting every public function of ThreadPool I had to implement #[derive(Clone) manually so I would be able to add an example.
I assume cargo doc has a default template for the derive-able traits.
So I propose something like this:
#[derive(Clone)/// My custom doc/// ```/// let my = custom.example();/// ```
#[derive(PartialEq,Eq)/// My custom doc for both traits/// ```/// let my = custom.example();/// ```structCustomStruct;
The template would have to include something like "yield" within the code it is generating.
In this case it should generate something equal to:
implCloneforCustomStruct{/// My custom doc/// ```/// let my = custom.example();/// ```fnclone(&self) -> Self{CustomStruct}}/* similar for the other two traits */structCustomStruct;
What do you think?
The text was updated successfully, but these errors were encountered:
Yep, this sounds like a job for rustdoc since cargo doc mostly just calls rustdoc. @dns2utf8 I've taken the liberty of moving this issue over to rust-lang/rust#44118 for you!
While documenting every public function of ThreadPool I had to implement
#[derive(Clone)
manually so I would be able to add an example.I assume
cargo doc
has a default template for the derive-able traits.So I propose something like this:
The template would have to include something like "yield" within the code it is generating.
In this case it should generate something equal to:
What do you think?
The text was updated successfully, but these errors were encountered: