Для запуска тестов сначала соберите код как библиотеку, а затем скажите rustdoc где найти эту библиотеку, чтобы он мог подключить её к каждому документационному тесту:

$ rustc doc.rs --crate-type lib

$ rustdoc --test --extern doc="libdoc.rlib" doc.rs

<p id="Смотрите_также_73"><strong><a l:href="#Смотрите_также_73">Смотрите также:</a></strong></p>

   • The Rust Book: Making Useful Documentation Comments

   • The Rustdoc Book

   • The Reference: Doc comments

   • RFC 1574: API Documentation Conventions

   • RFC 1946: Relative links to other items from doc comments (intra-rustdoc links)

   • Is there any documentation style guide for comments? (reddit)

<p id="playpen"><strong><a l:href="#playpen">Playpen</a></strong></p>
Перейти на страницу:

Похожие книги