doc-comment
doc-comment copied to clipboard
Add doc_compile macro to compile external files only.
I want to guarantee all examples in external files can pass compiling.
The main reason not to add no_run
for each block is many markdown renders cannot correctly recognize a "rust,no_run" block.
So, is there any macro or attribute to set global no_run
?
I don't recall rustdoc having such an option. I'd suggest you to open an issue on the rust repository so it can be added.
Thx, I'm going to open an issue.
Thanks!
Since #21, this crate is using proc-macro. So we could now set a global option to be used in all codeblocks put into the macro.
Great! Is there some progress?
Not yet, I need to finish the update to proc-macro. And once done, it'll only work on nightly. Not sure this is what most users want for now. :)
I don't think it's a big problem as we can use cfg_attr
to optionally enable it (and external_doc
is also a nightly only feature).
No I mean, to finish the switch to proc-macro, which all the crate will rely upon, I need features which are nightly-only for the moment. This is why I didn't finish it yet.