Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation example contains non-standard Arguments section #1457

Closed
Skepfyr opened this issue Aug 27, 2021 · 1 comment
Closed

Documentation example contains non-standard Arguments section #1457

Skepfyr opened this issue Aug 27, 2021 · 1 comment

Comments

@Skepfyr
Copy link
Contributor

Skepfyr commented Aug 27, 2021

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!)

@marioidival
Copy link
Member

Hi, I'm closing this issue just to clean up the items that already exist. If you think this issue makes sense to stay open, please create a new issue with updated information and mention this one.

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants