Skip to content

Commit

Permalink
Ignore doctests for unexported macros
Browse files Browse the repository at this point in the history
Due to rust-lang/rust#97030, cargo test will fail to doctest macros
unless they are exported, breaking the examples for libc_bitflags! and
libc_enum!.

Adds `ignore` to the examples for these macros to stop tests from
failing.
  • Loading branch information
zombiepigdragon authored and rtzoeller committed Dec 2, 2022
1 parent 7eb07b8 commit 8b1504f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// The `libc` crate must be in scope with the name `libc`.
///
/// # Example
/// ```
/// ```ignore
/// libc_bitflags!{
/// pub struct ProtFlags: libc::c_int {
/// PROT_NONE;
Expand All @@ -25,7 +25,7 @@
/// various flags have different types, so we cast the broken ones to the right
/// type.
///
/// ```
/// ```ignore
/// libc_bitflags!{
/// pub struct SaFlags: libc::c_ulong {
/// SA_NOCLDSTOP as libc::c_ulong;
Expand Down Expand Up @@ -66,7 +66,7 @@ macro_rules! libc_bitflags {
/// The `libc` crate must be in scope with the name `libc`.
///
/// # Example
/// ```
/// ```ignore
/// libc_enum!{
/// pub enum ProtFlags {
/// PROT_NONE,
Expand Down

0 comments on commit 8b1504f

Please sign in to comment.