diff options
| author | Dan Gohman <dev@sunfishcode.online> | 2022-02-01 13:46:05 -0800 |
|---|---|---|
| committer | Dan Gohman <dev@sunfishcode.online> | 2022-02-01 14:05:43 -0800 |
| commit | ca42a1bece0494a86b80713c6d0f8dbc3db667fa (patch) | |
| tree | 0242db542f2b38b7a0fb5adb8b30cad5193fc123 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
| parent | ad88831cd50ffe9cb9006bbdcb7fc9d97142e410 (diff) | |
| download | rust-ca42a1bece0494a86b80713c6d0f8dbc3db667fa.tar.gz rust-ca42a1bece0494a86b80713c6d0f8dbc3db667fa.zip | |
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 needed 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 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions
