Skip to content

Commit

Permalink
Add the new stability attributes, for Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Jun 15, 2022
1 parent 007cbfd commit ee49d65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions library/std/src/os/windows/io/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ impl OwnedHandle {
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)
}
Expand Down
1 change: 1 addition & 0 deletions library/std/src/os/windows/io/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ impl OwnedSocket {
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 {
Expand Down

0 comments on commit ee49d65

Please sign in to comment.