diff --git a/src/wrappers/themis/rust/libthemis-src/src/lib.rs b/src/wrappers/themis/rust/libthemis-src/src/lib.rs index 4b639c9f7..7ffc512a0 100644 --- a/src/wrappers/themis/rust/libthemis-src/src/lib.rs +++ b/src/wrappers/themis/rust/libthemis-src/src/lib.rs @@ -34,14 +34,12 @@ //! Typical usage from a `*-sys` crate looks like this: //! //! ```no_run -//! fn main() { -//! #[cfg(feature = "vendored")] -//! libthemis_src::make(); +//! #[cfg(feature = "vendored")] +//! libthemis_src::make(); //! -//! // Go on with your usual build.rs business, pkg_config crate -//! // should be able to locate the local installation of Themis. -//! // You'll probably need to use the static library. -//! } +//! // Go on with your usual build.rs business, pkg_config crate +//! // should be able to locate the local installation of Themis. +//! // You'll probably need to use the static library. //! ``` use std::env; diff --git a/tests/rust/run_tests.sh b/tests/rust/run_tests.sh index a20f8a27e..f7d8d8ca8 100755 --- a/tests/rust/run_tests.sh +++ b/tests/rust/run_tests.sh @@ -31,8 +31,13 @@ cargo test --all -- --test-threads 1 echo echo "Checking documentation..." echo -cargo clean --doc && cargo doc --no-deps -cargo clean --doc && cargo doc --no-deps --features "vendored" +# Cargo does not allow "--features" to be used with virtual crate in workspace. +# Jump into RustThemis subdirectory to make Cargo happy and use "--workspace" +# to still document all crates in the workspace. +cd src/wrappers/themis/rust +cargo clean --doc && cargo doc --workspace --no-deps +cargo clean --doc && cargo doc --workspace --no-deps --features "vendored" +cd - echo echo "Rust tests OK!"