Skip to content

Commit c7442c3

Browse files
committed
Merge remote-tracking branch 'origin/master' into ah/linux-sched-rt
2 parents b8ba4ab + a72936d commit c7442c3

File tree

17 files changed

+52
-49
lines changed

17 files changed

+52
-49
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ jobs:
396396
uname -a
397397
run: |
398398
export PATH=$HOME/.rust_solaris/bin:$PATH
399-
cargo build --target x86_64-pc-solaris --all-targets --all-features && sudo cargo test
399+
cargo build --target x86_64-pc-solaris --all-targets --all-features && sudo env PATH=$PATH cargo test
400400
401401
# Test that we can build with the lowest version of all dependencies.
402402
# "cargo test" doesn't work because some of our dev-dependencies, like

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ targets = [
2828
]
2929

3030
[dependencies]
31-
libc = { version = "0.2.171", features = ["extra_traits"] }
31+
libc = { version = "=0.2.172", features = ["extra_traits"] }
3232
bitflags = "2.3.3"
3333
cfg-if = "1.0"
3434
pin-utils = { version = "0.1.0", optional = true }

changelog/2642.removed.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Removed `Eq` and `PartialEq` implementations from `SigHandler`, because they
2+
never worked reliably. The suggested alternative is `matches!`. For example:
3+
```
4+
let h: SigHandler = ...
5+
if matches!(h, SigHandler::SigIgn) {
6+
...
7+
}
8+
```

src/dir.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ impl Dir {
119119
}
120120

121121
/// Returns an iterator of `Result<Entry>` which rewinds when finished.
122-
pub fn iter(&mut self) -> Iter {
122+
pub fn iter(&mut self) -> Iter<'_> {
123123
Iter(self)
124124
}
125125
}
@@ -133,7 +133,7 @@ impl Dir {
133133
unsafe impl Send for Dir {}
134134

135135
impl std::os::fd::AsFd for Dir {
136-
fn as_fd(&self) -> std::os::fd::BorrowedFd {
136+
fn as_fd(&self) -> std::os::fd::BorrowedFd<'_> {
137137
let raw_fd = self.as_raw_fd();
138138

139139
// SAFETY:

src/fcntl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,15 +745,15 @@ pub enum FcntlArg<'a> {
745745
F_SETFL(OFlag), // O_NONBLOCK
746746
/// Set or clear a file segment lock
747747
F_SETLK(&'a libc::flock),
748-
/// Like [`F_SETLK`](FcntlArg::F_SETLK) except that if a shared or exclusive lock is blocked by
748+
/// Like [`F_SETLK`] except that if a shared or exclusive lock is blocked by
749749
/// other locks, the process waits until the request can be satisfied.
750750
F_SETLKW(&'a libc::flock),
751751
/// Get the first lock that blocks the lock description
752752
F_GETLK(&'a mut libc::flock),
753753
/// Acquire or release an open file description lock
754754
#[cfg(linux_android)]
755755
F_OFD_SETLK(&'a libc::flock),
756-
/// Like [`F_OFD_SETLK`](FcntlArg::F_OFD_SETLK) except that if a conflicting lock is held on
756+
/// Like [`F_OFD_SETLK`] except that if a conflicting lock is held on
757757
/// the file, then wait for that lock to be released.
758758
#[cfg(linux_android)]
759759
F_OFD_SETLKW(&'a libc::flock),

src/mqueue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ pub fn mq_remove_nonblock(mqd: &MqdT) -> Result<MqAttr> {
315315
#[cfg(any(target_os = "linux", target_os = "netbsd", target_os = "dragonfly"))]
316316
impl AsFd for MqdT {
317317
/// Borrow the underlying message queue descriptor.
318-
fn as_fd(&self) -> BorrowedFd {
318+
fn as_fd(&self) -> BorrowedFd<'_> {
319319
// SAFETY: [MqdT] will only contain a valid fd by construction.
320320
unsafe { BorrowedFd::borrow_raw(self.0) }
321321
}

src/sys/aio.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
//! [`cancel`](trait.Aio.html#method.cancel) or
2424
//! [`aio_cancel_all`](fn.aio_cancel_all.html), though the operating system may
2525
//! not support this for all filesystems and devices.
26+
#![allow(clippy::doc_overindented_list_items)] // It looks better this way
2627
#[cfg(target_os = "freebsd")]
2728
use std::io::{IoSlice, IoSliceMut};
2829
use std::{
@@ -313,7 +314,7 @@ pub trait Aio {
313314
fn error(self: Pin<&mut Self>) -> Result<()>;
314315

315316
/// Returns the underlying file descriptor associated with the operation.
316-
fn fd(&self) -> BorrowedFd;
317+
fn fd(&self) -> BorrowedFd<'_>;
317318

318319
/// Does this operation currently have any in-kernel state?
319320
///
@@ -572,8 +573,9 @@ impl<'a> AioRead<'a> {
572573
/// * `fd`: File descriptor to read from
573574
/// * `offs`: File offset
574575
/// * `buf`: A memory buffer. It must outlive the `AioRead`.
575-
/// * `prio`: If POSIX Prioritized IO is supported, then the operation
576-
/// will be prioritized at the process's priority level minus `prio`
576+
/// * `prio`: If POSIX Prioritized IO is supported, then the
577+
/// operation will be prioritized at the process's
578+
/// priority level minus `prio`.
577579
/// * `sigev_notify`: Determines how you will be notified of event completion.
578580
pub fn new(
579581
fd: BorrowedFd<'a>,
@@ -802,8 +804,9 @@ impl<'a> AioWrite<'a> {
802804
/// * `fd`: File descriptor to write to
803805
/// * `offs`: File offset
804806
/// * `buf`: A memory buffer. It must outlive the `AioWrite`.
805-
/// * `prio`: If POSIX Prioritized IO is supported, then the operation
806-
/// will be prioritized at the process's priority level minus `prio`
807+
/// * `prio`: If POSIX Prioritized IO is supported, then the
808+
/// operation will be prioritized at the process's
809+
/// priority level minus `prio`
807810
/// * `sigev_notify`: Determines how you will be notified of event completion.
808811
pub fn new(
809812
fd: BorrowedFd<'a>,

src/sys/eventfd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl EventFd {
101101
}
102102
}
103103
impl AsFd for EventFd {
104-
fn as_fd(&self) -> BorrowedFd {
104+
fn as_fd(&self) -> BorrowedFd<'_> {
105105
self.0.as_fd()
106106
}
107107
}

src/sys/fanotify.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ impl FanotifyEvent {
229229
/// The file descriptor of the event. If the value is `None` when reading
230230
/// from the fanotify group, this event is to notify that a group queue
231231
/// overflow occured.
232-
pub fn fd(&self) -> Option<BorrowedFd> {
232+
pub fn fd(&self) -> Option<BorrowedFd<'_>> {
233233
if self.0.fd == libc::FAN_NOFD {
234234
None
235235
} else {
@@ -443,4 +443,4 @@ impl Fanotify {
443443
fd
444444
}
445445
}
446-
}
446+
}

src/sys/select.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl<'fd> FdSet<'fd> {
107107
/// assert_eq!(fds, vec![4, 9]);
108108
/// ```
109109
#[inline]
110-
pub fn fds(&self, highest: Option<RawFd>) -> Fds {
110+
pub fn fds(&self, highest: Option<RawFd>) -> Fds<'_, '_> {
111111
Fds {
112112
set: self,
113113
range: 0..highest.map(|h| h as usize + 1).unwrap_or(FD_SETSIZE),

0 commit comments

Comments
 (0)