Skip to content

Commit b53dfa8

Browse files
Merge #1730
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]>
2 parents 7e8757f + 0ac338b commit b53dfa8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/macros.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ macro_rules! feature {
1919
/// The `libc` crate must be in scope with the name `libc`.
2020
///
2121
/// # Example
22-
/// ```
22+
/// ```ignore
2323
/// libc_bitflags!{
2424
/// pub struct ProtFlags: libc::c_int {
2525
/// PROT_NONE;
@@ -39,7 +39,7 @@ macro_rules! feature {
3939
/// various flags have different types, so we cast the broken ones to the right
4040
/// type.
4141
///
42-
/// ```
42+
/// ```ignore
4343
/// libc_bitflags!{
4444
/// pub struct SaFlags: libc::c_ulong {
4545
/// SA_NOCLDSTOP as libc::c_ulong;
@@ -80,7 +80,7 @@ macro_rules! libc_bitflags {
8080
/// The `libc` crate must be in scope with the name `libc`.
8181
///
8282
/// # Example
83-
/// ```
83+
/// ```ignore
8484
/// libc_enum!{
8585
/// pub enum ProtFlags {
8686
/// PROT_NONE,

0 commit comments

Comments
 (0)