File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 255
255
//! The platform-specific parts of the Rust standard library expose types that reflect these
256
256
//! concepts, see [`os::unix`] and [`os::windows`].
257
257
//!
258
- //! To uphold I/O safety, it is crucial that no code acts on file descriptors it does not own. In
259
- //! other words, a safe function that takes a regular integer, treats it as a file descriptor, and
260
- //! acts on it, is *unsound*.
258
+ //! To uphold I/O safety, it is crucial that no code acts on file descriptors it does not own or
259
+ //! borrow, and no code closes file descriptors it does not own. In other words, a safe function
260
+ //! that takes a regular integer, treats it as a file descriptor, and acts on it, is *unsound*.
261
261
//!
262
262
//! Not upholding I/O safety and acting on a file descriptor without proof of ownership can lead to
263
263
//! misbehavior and even Undefined Behavior in code that relies on ownership of its file
You can’t perform that action at this time.
0 commit comments