-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Comments
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). |
I got more than one question about it, basically. |
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. |
Yeah, we should, IMO. |
We should indeed. |
All right! I'll submit some changes. |
…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.
as per #48961, this is now done 🎉 https://doc.rust-lang.org/nightly/rustdoc/documentation-tests.html#passing-or-failing-a-doctest thanks @Songbird0! |
this is non-obvious to some people, we should add it.
The text was updated successfully, but these errors were encountered: