about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLoïc BRANSTETT <lolo.branstett@numericable.fr>2022-02-26 01:31:36 +0100
committerLoïc BRANSTETT <lolo.branstett@numericable.fr>2022-03-04 11:34:51 +0100
commita93c7abc690fa9250182c9b637dfe4241d6c6d33 (patch)
tree039d0218b61606de5d145bd593c422ceaea05d5d
parent08e1e67b490253deed9b91761d95fe80a2f48cd6 (diff)
downloadrust-a93c7abc690fa9250182c9b637dfe4241d6c6d33.tar.gz
rust-a93c7abc690fa9250182c9b637dfe4241d6c6d33.zip
Add #![allow(unexpected_cfgs)] in preparation of global --check-cfg
-rw-r--r--library/core/src/mem/maybe_uninit.rs1
-rw-r--r--library/std/src/os/windows/fs.rs3
2 files changed, 4 insertions, 0 deletions
diff --git a/library/core/src/mem/maybe_uninit.rs b/library/core/src/mem/maybe_uninit.rs
index e38c0412a0a..9db5a9a2889 100644
--- a/library/core/src/mem/maybe_uninit.rs
+++ b/library/core/src/mem/maybe_uninit.rs
@@ -817,6 +817,7 @@ impl<T> MaybeUninit<T> {
     /// ### Correct usage of this method:
     ///
     /// ```rust
+    /// # #![allow(unexpected_cfgs)]
     /// use std::mem::MaybeUninit;
     ///
     /// # unsafe extern "C" fn initialize_buffer(buf: *mut [u8; 1024]) { *buf = [0; 1024] }
diff --git a/library/std/src/os/windows/fs.rs b/library/std/src/os/windows/fs.rs
index 31d1e3c1e42..f15baff59db 100644
--- a/library/std/src/os/windows/fs.rs
+++ b/library/std/src/os/windows/fs.rs
@@ -158,6 +158,7 @@ pub trait OpenOptionsExt {
     /// # Examples
     ///
     /// ```no_run
+    /// # #![allow(unexpected_cfgs)]
     /// # #[cfg(for_demonstration_only)]
     /// extern crate winapi;
     /// # mod winapi { pub const FILE_FLAG_DELETE_ON_CLOSE: u32 = 0x04000000; }
@@ -195,6 +196,7 @@ pub trait OpenOptionsExt {
     /// # Examples
     ///
     /// ```no_run
+    /// # #![allow(unexpected_cfgs)]
     /// # #[cfg(for_demonstration_only)]
     /// extern crate winapi;
     /// # mod winapi { pub const FILE_ATTRIBUTE_HIDDEN: u32 = 2; }
@@ -236,6 +238,7 @@ pub trait OpenOptionsExt {
     /// # Examples
     ///
     /// ```no_run
+    /// # #![allow(unexpected_cfgs)]
     /// # #[cfg(for_demonstration_only)]
     /// extern crate winapi;
     /// # mod winapi { pub const SECURITY_IDENTIFICATION: u32 = 0; }