Skip to content

Commit

Permalink
tests: don't run doctests on non-exported macros
Browse files Browse the repository at this point in the history
Since Rust 1.62.0, doctests on macros are run even if the macro isn't
marked #[macro_export] [0]. Because the macro can't actually be accessed
externally, we explicitly mark the doctest as ignored so it continues
not to be run.

[0]: rust-lang/rust#96630
  • Loading branch information
Xiretza committed Jun 15, 2022
1 parent 41a9c69 commit 58fbdbe
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/newtype_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ macro_rules! public_newtype_traits (($newtype:ident) => (
/// Usage:
/// Generating secret datatypes, e.g. keys
///
/// ```
/// ```ignore
/// new_type! {
/// /// This is some documentation for our type
/// secret Key(KEYBYTES);
Expand All @@ -181,17 +181,16 @@ macro_rules! public_newtype_traits (($newtype:ident) => (
///
/// Generating public datatypes, e.g. public keys
///
/// ```
/// ```ignore
/// new_type! {
/// /// This is some documentation for our type
/// public PublicKey(PUBLICKEYBYTES);
/// }
///
/// ```
///
/// Generating nonce types
///
/// ```
/// ```ignore
/// new_type! {
/// /// This is some documentation for our type
/// nonce Nonce(NONCEBYTES);
Expand Down

0 comments on commit 58fbdbe

Please sign in to comment.