Skip to content

Commit 3a75538

Browse files
committed
fix(tests): don't run doctests on non-exported macros
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
1 parent a713699 commit 3a75538

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/newtype_macros.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ macro_rules! public_newtype_traits (($newtype:ident) => (
172172
/// Usage:
173173
/// Generating secret datatypes, e.g. keys
174174
///
175-
/// ```
175+
/// ```ignore
176176
/// new_type! {
177177
/// /// This is some documentation for our type
178178
/// secret Key(KEYBYTES);
@@ -181,17 +181,16 @@ macro_rules! public_newtype_traits (($newtype:ident) => (
181181
///
182182
/// Generating public datatypes, e.g. public keys
183183
///
184-
/// ```
184+
/// ```ignore
185185
/// new_type! {
186186
/// /// This is some documentation for our type
187187
/// public PublicKey(PUBLICKEYBYTES);
188188
/// }
189-
///
190189
/// ```
191190
///
192191
/// Generating nonce types
193192
///
194-
/// ```
193+
/// ```ignore
195194
/// new_type! {
196195
/// /// This is some documentation for our type
197196
/// nonce Nonce(NONCEBYTES);

0 commit comments

Comments
 (0)