fix missing_panics_doc in std::os::fd::owned
https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
This commit is contained in:
parent
2848c2ebe9
commit
215768a734
1 changed files with 9 additions and 1 deletions
|
|
@ -77,7 +77,11 @@ impl BorrowedFd<'_> {
|
|||
/// # Safety
|
||||
///
|
||||
/// The resource pointed to by `fd` must remain open for the duration of
|
||||
/// the returned `BorrowedFd`, and it must not have the value `-1`.
|
||||
/// the returned `BorrowedFd`.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if the raw file descriptor has the value `-1`.
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
#[rustc_const_stable(feature = "io_safety", since = "1.63.0")]
|
||||
|
|
@ -177,6 +181,10 @@ impl FromRawFd for OwnedFd {
|
|||
/// [ownership][io-safety]. The resource must not require any cleanup other than `close`.
|
||||
///
|
||||
/// [io-safety]: io#io-safety
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if the raw file descriptor has the value `-1`.
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
unsafe fn from_raw_fd(fd: RawFd) -> Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue