diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-03-03 11:02:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-03 11:02:49 +0100 |
| commit | afd6f5c47808c7676014e88d0fda82e95c3a9da0 (patch) | |
| tree | 5b241d5acad5589b2b914da331a189ec81ccff37 /library/std/src/sys/unix/stack_overflow.rs | |
| parent | 2f8d1a835b4e7feaf625f74d0d5cb9b84dbc845a (diff) | |
| parent | 8253cfef7aa346c894259471e1e38a34df65cb58 (diff) | |
| download | rust-afd6f5c47808c7676014e88d0fda82e95c3a9da0.tar.gz rust-afd6f5c47808c7676014e88d0fda82e95c3a9da0.zip | |
Rollup merge of #93562 - sunfishcode:sunfishcode/io-docs, r=joshtriplett
Update the documentation for `{As,Into,From}Raw{Fd,Handle,Socket}`.
This change weakens the descriptions of the
`{as,into,from}_raw_{fd,handle,socket}` descriptions from saying that
they *do* express ownership relations to say that they are *typically used*
in ways that express ownership relations. This is needed since, for
example, std's own [`RawFd`] implements `{As,From,Into}Fd` without any of
the ownership relationships.
This adds proper `# Safety` comments to `from_raw_{fd,handle,socket}`,
adds the requirement that raw handles be not opened with the
`FILE_FLAG_OVERLAPPED` flag, and merges the `OwnedHandle::from_raw_handle`
comment into the main `FromRawHandle::from_raw_handle` comment.
And, this changes `HandleOrNull` and `HandleOrInvalid` to not implement
`FromRawHandle`, since they are intended for limited use in FFI situations,
and not for generic use, and they have constraints that are stronger than
the those of `FromRawHandle`.
[`RawFd`]: https://doc.rust-lang.org/stable/std/os/unix/io/type.RawFd.html
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
