diff options
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/os/unix/io/mod.rs | 7 | ||||
| -rw-r--r-- | library/std/src/os/windows/io/mod.rs | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/library/std/src/os/unix/io/mod.rs b/library/std/src/os/unix/io/mod.rs index 5a7682b5079..0fd9591b016 100644 --- a/library/std/src/os/unix/io/mod.rs +++ b/library/std/src/os/unix/io/mod.rs @@ -17,9 +17,10 @@ //! Like raw pointers, `RawFd` values are primitive values. And in new code, //! they should be considered unsafe to do I/O on (analogous to dereferencing //! them). Rust did not always provide this guidance, so existing code in the -//! Rust ecosystem often doesn't mark `RawFd` usage as unsafe. Libraries are -//! encouraged to migrate, either by adding `unsafe` to APIs that dereference -//! `RawFd` values, or by using to `BorrowedFd` or `OwnedFd` instead. +//! Rust ecosystem often doesn't mark `RawFd` usage as unsafe. Once the +//! `io_safety` feature is stable, libraries will be encouraged to migrate, +//! either by adding `unsafe` to APIs that dereference `RawFd` values, or by +//! using to `BorrowedFd` or `OwnedFd` instead. //! //! Like references, `BorrowedFd` values are tied to a lifetime, to ensure //! that they don't outlive the resource they point to. These are safe to diff --git a/library/std/src/os/windows/io/mod.rs b/library/std/src/os/windows/io/mod.rs index d8e453bc0e0..2f6f0769548 100644 --- a/library/std/src/os/windows/io/mod.rs +++ b/library/std/src/os/windows/io/mod.rs @@ -23,10 +23,10 @@ //! And in new code, they should be considered unsafe to do I/O on (analogous //! to dereferencing them). Rust did not always provide this guidance, so //! existing code in the Rust ecosystem often doesn't mark `RawHandle` and -//! `RawSocket` usage as unsafe. Libraries are encouraged to migrate, either by -//! adding `unsafe` to APIs that dereference `RawHandle` and `RawSocket` -//! values, or by using to `BorrowedHandle`, `BorrowedSocket`, `OwnedHandle`, -//! or `OwnedSocket`. +//! `RawSocket` usage as unsafe. Once the `io_safety` feature is stable, +//! libraries will be encouraged to migrate, either by adding `unsafe` to APIs +//! that dereference `RawHandle` and `RawSocket` values, or by using to +//! `BorrowedHandle`, `BorrowedSocket`, `OwnedHandle`, or `OwnedSocket`. //! //! Like references, `BorrowedHandle` and `BorrowedSocket` values are tied to a //! lifetime, to ensure that they don't outlive the resource they point to. |
