You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-nix0.22/0ac338b.patch

47 lines
1.3 KiB

From 0ac338b74445bf55ffd70d6bc85f4339d151f6fc Mon Sep 17 00:00:00 2001
From: Alex Rawson <ajzecrom@gmail.com>
Date: Tue, 31 May 2022 17:51:45 -0500
Subject: [PATCH] Ignore doctests for unexported macros
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.
---
src/macros.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/macros.rs b/src/macros.rs
index 018534fa67..99e0de8866 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -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;
@@ -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;
@@ -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,