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

rustdoc book doesn't mention assert in doc tests #47945

Closed
steveklabnik opened this issue Feb 1, 2018 · 7 comments
Closed

rustdoc book doesn't mention assert in doc tests #47945

steveklabnik opened this issue Feb 1, 2018 · 7 comments
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@steveklabnik
Copy link
Member

this is non-obvious to some people, we should add it.

@steveklabnik steveklabnik added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Feb 1, 2018
@gsollazzo gsollazzo added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Feb 2, 2018
@GuillaumeGomez
Copy link
Member

It's a macro and you're supposed to be able to write any rust code you want, so how can it be non-obvious? :-/ I'm a bit skeptical about this one (not against, just surprised).

@steveklabnik
Copy link
Member Author

I got more than one question about it, basically.

@Songbird0
Copy link
Contributor

Songbird0 commented Mar 10, 2018

So should we add it? We could simply add a line indicating that macros dedicated to assertions can also be used into the documentation.

This would be a simple clarification for Rust learners.

cc @GuillaumeGomez @steveklabnik

@steveklabnik
Copy link
Member Author

Yeah, we should, IMO.

@GuillaumeGomez
Copy link
Member

We should indeed.

@Songbird0
Copy link
Contributor

All right! I'll submit some changes.

Songbird0 added a commit to Songbird0/rust that referenced this issue Mar 13, 2018
kennytm added a commit to kennytm/rust that referenced this issue Mar 15, 2018
…ns, r=GuillaumeGomez

Rustdoc: example of use of assertions

I added this section at the beginning of the file because it seems to be basic information. Let me know if there's someplace more relevant.

See rust-lang#47945.
@frewsxcv
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants