commit 592e8ac395fc29113774fb15ca0227699d14e080 Author: Nick Mathewson nickm@torproject.org Date: Wed Jun 20 17:16:44 2018 -0400
Disable doctests in src/rust/crypto module.
These all need C linking to work, and so far, rustdoc does not seem to respect cargo setting about build scripts or RUSTOPTIONS. --- src/rust/crypto/digests/sha2.rs | 8 ++++---- src/rust/crypto/lib.rs | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/rust/crypto/digests/sha2.rs b/src/rust/crypto/digests/sha2.rs index 1e6b8e0e8..03e0843dc 100644 --- a/src/rust/crypto/digests/sha2.rs +++ b/src/rust/crypto/digests/sha2.rs @@ -43,7 +43,7 @@ pub struct Sha256 { /// /// # Examples /// -/// ``` +/// ```rust,no_run /// use crypto::digests::sha2::{Sha256, Digest}; /// /// let mut hasher: Sha256 = Sha256::default(); @@ -66,7 +66,7 @@ impl BlockInput for Sha256 { /// /// # Examples /// -/// ``` +/// ```rust,no_run /// use crypto::digests::sha2::{Sha256, Digest}; /// /// let mut hasher: Sha256 = Sha256::default(); @@ -110,7 +110,7 @@ pub struct Sha512 { /// /// # Examples /// -/// ``` +/// ```rust,no_run /// use crypto::digests::sha2::{Sha512, Digest}; /// /// let mut hasher: Sha512 = Sha512::default(); @@ -133,7 +133,7 @@ impl BlockInput for Sha512 { /// /// # Examples /// -/// ``` +/// ```rust,no_run /// use crypto::digests::sha2::{Sha512, Digest}; /// /// let mut hasher: Sha512 = Sha512::default(); diff --git a/src/rust/crypto/lib.rs b/src/rust/crypto/lib.rs index d120635b9..f72a859dd 100644 --- a/src/rust/crypto/lib.rs +++ b/src/rust/crypto/lib.rs @@ -9,7 +9,7 @@ //! The `digests` module contains submodules for specific hash digests //! and extendable output functions. //! -//! ``` +//! ```rust,no_run //! use crypto::digests::sha2::*; //! //! let mut hasher: Sha256 = Sha256::default(); @@ -43,4 +43,3 @@ extern crate tor_log;
pub mod digests; // Unfortunately named "digests" plural to avoid name conflict with the digest crate pub mod rand; -