Closed
Description
The documentation example is src/meta/doc.md
on Person::new
looks like:
/// Returns a person with the name given them
///
/// # Arguments
///
/// * `name` - A string slice that holds the name of the person
///
/// # Examples
///
/// ```
/// // You can have rust code between fences inside the comments
/// // If you pass --test to `rustdoc`, it will even test it for you!
/// use doc::Person;
/// let person = Person::new("name");
/// ```
As far as I am aware the Arguments
section is non-standard (and recommended against?), I've definitely never seen it in the standard library or any of the most popular crates. I think it could just be removed, maybe even replaced by an example with the headings suggested by RFC 1574: Examples, Panics, Errors, Safety, Aborts, Undefined Behavior. (Maybe not all at once!)
Metadata
Metadata
Assignees
Labels
No labels