rust-lang / nomicon

The Dark Arts of Advanced and Unsafe Rust Programming
https://doc.rust-lang.org/nomicon/
Apache License 2.0
1.79k stars 261 forks source link

Audit `ignore` annotations #288

Closed JohnTitor closed 3 years ago

JohnTitor commented 3 years ago

Fixes #283

JohnTitor commented 3 years ago

One possible option in the future is to use {{#rustdoc_include}} (along with mdbook's include anchors), and place the sample code in a separate directory where it can be more thoroughly tested. I notice there are huge chunks of code that aren't tested at all, which means there is a good likelihood that it contains errors, or may become incorrect in the future. TRPL is written this way. A big downside is that it becomes more difficult to edit/read the markdown source since the examples are in a separate file, so it is tough to decide if that is worth it.

Sounds good to me, at least we could use that for the examples using the libc crate, I believe. I'll open an issue about that not to forget and to discuss.