Skip to content

Commit

Permalink
Merge #1730
Browse files Browse the repository at this point in the history
1730: Ignore doctests for unexported macros r=asomers a=zombiepigdragon

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.

`cargo test` already fails on cargo 1.62.0-beta.2, and the above issue makes it seem unlikely that this will be changed on the Rust side. If rust-lang/rust#96630 *does* get reverted, this PR can be closed/unmerged, although the test wasn't running beforehand, and it might be worth making this explicit regardless.

Co-authored-by: Alex Rawson <[email protected]>
  • Loading branch information
bors[bot] and zombiepigdragon authored May 31, 2022
2 parents 7e8757f + 0ac338b commit b53dfa8
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 @@ -19,7 +19,7 @@ macro_rules! feature {
/// 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 @@ -39,7 +39,7 @@ macro_rules! feature {
/// 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 @@ -80,7 +80,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 b53dfa8

Please sign in to comment.