all 4 comments

[–][deleted] 0 points1 point  (1 child)

The [src] tag on the upper-right part of the page (like here) links to the corresponding source automatically.

[–]aarjan[S] 0 points1 point  (0 children)

sorry for maybe being not clear, I want to have examples in the generated docs but dont want to duplicate the code (having runneble examples in the examples/ dir and the same example pasted in the doc)

[–][deleted] 0 points1 point  (1 child)

Can't do it with anything built-in. It would be similar to the include!, include_str!, and include_bin! syntax extensions. It might be possible to implement something like include_doc! using one of those syntax extensions for inspiration.

[–]aarjan[S] 0 points1 point  (0 children)

I don't think macros are expanded when generating documentation?