From 294fdb820c16ebba2bfa442e53b659752aa48a0d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 26 Sep 2024 09:28:23 +0200 Subject: [PATCH] clippy --- src/tools/miri/cargo-miri/src/phases.rs | 2 ++ src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs | 2 +- src/tools/miri/src/shims/unix/linux/epoll.rs | 6 +++--- src/tools/miri/src/shims/unix/linux/eventfd.rs | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/tools/miri/cargo-miri/src/phases.rs b/src/tools/miri/cargo-miri/src/phases.rs index 3743446e27648..e13ecbbe54ba5 100644 --- a/src/tools/miri/cargo-miri/src/phases.rs +++ b/src/tools/miri/cargo-miri/src/phases.rs @@ -666,6 +666,8 @@ pub fn phase_runner(mut binary_args: impl Iterator, phase: Runner match phase { RunnerPhase::Rustdoc => { cmd.stdin(std::process::Stdio::piped()); + // the warning is wrong, we have a `wait` inside the `scope` closure. + #[expect(clippy::zombie_processes)] let mut child = cmd.spawn().expect("failed to spawn process"); let child_stdin = child.stdin.take().unwrap(); // Write stdin in a background thread, as it may block. diff --git a/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs b/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs index f792e75ad0855..7eb6773038388 100644 --- a/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs +++ b/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs @@ -171,7 +171,7 @@ impl NewPermission { /// F2b: No `SharedReadWrite` or `Unique` will ever be added on top of our `SharedReadOnly`. /// F3: If an access happens with an `&` outside `UnsafeCell`, /// it requires the `SharedReadOnly` to still be in the stack. - +/// /// Core relation on `Permission` to define which accesses are allowed impl Permission { /// This defines for a given permission, whether it permits the given kind of access. diff --git a/src/tools/miri/src/shims/unix/linux/epoll.rs b/src/tools/miri/src/shims/unix/linux/epoll.rs index 3d4fe770e99e9..b63c29594b407 100644 --- a/src/tools/miri/src/shims/unix/linux/epoll.rs +++ b/src/tools/miri/src/shims/unix/linux/epoll.rs @@ -401,19 +401,19 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { /// list about file descriptors in the interest list that have some /// events available. Up to `maxevents` are returned by `epoll_wait()`. /// The `maxevents` argument must be greater than zero. - + /// /// The `timeout` argument specifies the number of milliseconds that /// `epoll_wait()` will block. Time is measured against the /// CLOCK_MONOTONIC clock. If the timeout is zero, the function will not block, /// while if the timeout is -1, the function will block /// until at least one event has been retrieved (or an error /// occurred). - + /// /// A call to `epoll_wait()` will block until either: /// • a file descriptor delivers an event; /// • the call is interrupted by a signal handler; or /// • the timeout expires. - + /// /// Note that the timeout interval will be rounded up to the system /// clock granularity, and kernel scheduling delays mean that the /// blocking interval may overrun by a small amount. Specifying a diff --git a/src/tools/miri/src/shims/unix/linux/eventfd.rs b/src/tools/miri/src/shims/unix/linux/eventfd.rs index d1d461daa993e..9fbabbd964180 100644 --- a/src/tools/miri/src/shims/unix/linux/eventfd.rs +++ b/src/tools/miri/src/shims/unix/linux/eventfd.rs @@ -110,7 +110,7 @@ impl FileDescription for Event { /// write either blocks until a read is performed on the /// file descriptor, or fails with the error EAGAIN if the /// file descriptor has been made nonblocking. - + /// /// A write fails with the error EINVAL if the size of the /// supplied buffer is less than 8 bytes, or if an attempt is /// made to write the value 0xffffffffffffffff.