]> git.lizzy.rs Git - rust.git/commitdiff
Add the new stability attributes, for Windows.
authorDan Gohman <dev@sunfishcode.online>
Wed, 15 Jun 2022 16:46:56 +0000 (09:46 -0700)
committerDan Gohman <dev@sunfishcode.online>
Wed, 15 Jun 2022 16:46:56 +0000 (09:46 -0700)
library/std/src/os/windows/io/handle.rs
library/std/src/os/windows/io/socket.rs

index 9ca5f3cc16838d03bf974392a90b68c275d835b8..16cc8fa2783eea6c13492710ccebfbe977e1b9ff 100644 (file)
@@ -188,6 +188,7 @@ pub fn try_clone(&self) -> crate::io::Result<Self> {
 impl BorrowedHandle<'_> {
     /// Creates a new `OwnedHandle` instance that shares the same underlying
     /// object as the existing `BorrowedHandle` instance.
+    #[stable(feature = "io_safety", since = "1.63.0")]
     pub fn try_clone_to_owned(&self) -> crate::io::Result<OwnedHandle> {
         self.duplicate(0, false, c::DUPLICATE_SAME_ACCESS)
     }
index 3eafb138265735c4c096b46b824da65173f5d322..72cb3406dcadaf7f4bbe5daa3494aaefc5ec6700 100644 (file)
@@ -107,6 +107,7 @@ pub(crate) fn set_no_inherit(&self) -> io::Result<()> {
 impl BorrowedSocket<'_> {
     /// Creates a new `OwnedSocket` instance that shares the same underlying
     /// object as the existing `BorrowedSocket` instance.
+    #[stable(feature = "io_safety", since = "1.63.0")]
     pub fn try_clone_to_owned(&self) -> io::Result<OwnedSocket> {
         let mut info = unsafe { mem::zeroed::<c::WSAPROTOCOL_INFO>() };
         let result = unsafe {