Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 18a9f46

Browse files
committed
Don't encourage migration until io_safety is stablized.
1 parent 1dbd6d6 commit 18a9f46

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

library/std/src/os/unix/io/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
//! Like raw pointers, `RawFd` values are primitive values. And in new code,
1818
//! they should be considered unsafe to do I/O on (analogous to dereferencing
1919
//! them). Rust did not always provide this guidance, so existing code in the
20-
//! Rust ecosystem often doesn't mark `RawFd` usage as unsafe. Libraries are
21-
//! encouraged to migrate, either by adding `unsafe` to APIs that dereference
22-
//! `RawFd` values, or by using to `BorrowedFd` or `OwnedFd` instead.
20+
//! Rust ecosystem often doesn't mark `RawFd` usage as unsafe. Once the
21+
//! `io_safety` feature is stable, libraries will be encouraged to migrate,
22+
//! either by adding `unsafe` to APIs that dereference `RawFd` values, or by
23+
//! using to `BorrowedFd` or `OwnedFd` instead.
2324
//!
2425
//! Like references, `BorrowedFd` values are tied to a lifetime, to ensure
2526
//! that they don't outlive the resource they point to. These are safe to

library/std/src/os/windows/io/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
//! And in new code, they should be considered unsafe to do I/O on (analogous
2424
//! to dereferencing them). Rust did not always provide this guidance, so
2525
//! existing code in the Rust ecosystem often doesn't mark `RawHandle` and
26-
//! `RawSocket` usage as unsafe. Libraries are encouraged to migrate, either by
27-
//! adding `unsafe` to APIs that dereference `RawHandle` and `RawSocket`
28-
//! values, or by using to `BorrowedHandle`, `BorrowedSocket`, `OwnedHandle`,
29-
//! or `OwnedSocket`.
26+
//! `RawSocket` usage as unsafe. Once the `io_safety` feature is stable,
27+
//! libraries will be encouraged to migrate, either by adding `unsafe` to APIs
28+
//! that dereference `RawHandle` and `RawSocket` values, or by using to
29+
//! `BorrowedHandle`, `BorrowedSocket`, `OwnedHandle`, or `OwnedSocket`.
3030
//!
3131
//! Like references, `BorrowedHandle` and `BorrowedSocket` values are tied to a
3232
//! lifetime, to ensure that they don't outlive the resource they point to.

0 commit comments

Comments
 (0)