mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-30 00:23:41 +00:00
Add the new stability attributes, for Windows.
This commit is contained in:
parent
007cbfd1db
commit
ee49d65fc3
@ -188,6 +188,7 @@ impl OwnedHandle {
|
|||||||
impl BorrowedHandle<'_> {
|
impl BorrowedHandle<'_> {
|
||||||
/// Creates a new `OwnedHandle` instance that shares the same underlying
|
/// Creates a new `OwnedHandle` instance that shares the same underlying
|
||||||
/// object as the existing `BorrowedHandle` instance.
|
/// 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> {
|
pub fn try_clone_to_owned(&self) -> crate::io::Result<OwnedHandle> {
|
||||||
self.duplicate(0, false, c::DUPLICATE_SAME_ACCESS)
|
self.duplicate(0, false, c::DUPLICATE_SAME_ACCESS)
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,7 @@ impl OwnedSocket {
|
|||||||
impl BorrowedSocket<'_> {
|
impl BorrowedSocket<'_> {
|
||||||
/// Creates a new `OwnedSocket` instance that shares the same underlying
|
/// Creates a new `OwnedSocket` instance that shares the same underlying
|
||||||
/// object as the existing `BorrowedSocket` instance.
|
/// object as the existing `BorrowedSocket` instance.
|
||||||
|
#[stable(feature = "io_safety", since = "1.63.0")]
|
||||||
pub fn try_clone_to_owned(&self) -> io::Result<OwnedSocket> {
|
pub fn try_clone_to_owned(&self) -> io::Result<OwnedSocket> {
|
||||||
let mut info = unsafe { mem::zeroed::<c::WSAPROTOCOL_INFO>() };
|
let mut info = unsafe { mem::zeroed::<c::WSAPROTOCOL_INFO>() };
|
||||||
let result = unsafe {
|
let result = unsafe {
|
||||||
|
Loading…
Reference in New Issue
Block a user