-
Notifications
You must be signed in to change notification settings - Fork 225
Document a binary? #238
Copy link
Copy link
Open
Labels
E-mediumEffort: This requires a fair amount of workEffort: This requires a fair amount of workP-mediumMedium priorityMedium priorityS-needs-designStatus: There's a problem here, but no obvious solution; or the solution raises other questionsStatus: There's a problem here, but no obvious solution; or the solution raises other questionsmentorThis has instructions for getting startedThis has instructions for getting started
Metadata
Metadata
Assignees
Labels
E-mediumEffort: This requires a fair amount of workEffort: This requires a fair amount of workP-mediumMedium priorityMedium priorityS-needs-designStatus: There's a problem here, but no obvious solution; or the solution raises other questionsStatus: There's a problem here, but no obvious solution; or the solution raises other questionsmentorThis has instructions for getting startedThis has instructions for getting started
Type
Fields
Give feedbackNo fields configured for issues without a type.
edit(@jyn514): Mentoring instructions for this issue are here: #238 (comment)
My crate has a macro that defines structs, and I want the docs to include an example of one of those generated structs. My solution was to write a binary,
src/bin/example.rs, that invokes the macro.This works great when I run
cargo doc. I seeexamplelisted in the crates sidebar, and it contains docs for the generated struct. However, it doesn't show up in docs.rs.I tried adding this to
Cargo.toml, but it didn't help:Is there some magical argument I can pass using
[package.metadata.docs.rs]that will make it document the binary? Any other suggestions?