Skip to content

Commit 36ae133

Browse files
committed
Auto merge of #3916 - rust-lang:rustup-2024-09-26, r=RalfJung
Automatic Rustup
2 parents fa6fa91 + e435638 commit 36ae133

File tree

13 files changed

+21
-21
lines changed

13 files changed

+21
-21
lines changed

cargo-miri/src/phases.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,8 @@ pub fn phase_runner(mut binary_args: impl Iterator<Item = String>, phase: Runner
666666
match phase {
667667
RunnerPhase::Rustdoc => {
668668
cmd.stdin(std::process::Stdio::piped());
669+
// the warning is wrong, we have a `wait` inside the `scope` closure.
670+
#[expect(clippy::zombie_processes)]
669671
let mut child = cmd.spawn().expect("failed to spawn process");
670672
let child_stdin = child.stdin.take().unwrap();
671673
// Write stdin in a background thread, as it may block.

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1b5aa96d6016bafe50e071b45d4d2e3c90fd766f
1+
76ed7a1fa40c3f54d3fd3f834e12bf9c932d0146

src/borrow_tracker/stacked_borrows/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl NewPermission {
171171
/// F2b: No `SharedReadWrite` or `Unique` will ever be added on top of our `SharedReadOnly`.
172172
/// F3: If an access happens with an `&` outside `UnsafeCell`,
173173
/// it requires the `SharedReadOnly` to still be in the stack.
174-
174+
///
175175
/// Core relation on `Permission` to define which accesses are allowed
176176
impl Permission {
177177
/// This defines for a given permission, whether it permits the given kind of access.

src/concurrency/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
748748
}
749749
),
750750
);
751-
return Ok(());
751+
Ok(())
752752
}
753753

754754
/// Wake up some thread (if there is any) sleeping on the conditional

src/concurrency/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> {
849849
// https://github.com/rust-lang/miri/issues/1763). In this case,
850850
// just do nothing, which effectively just returns to the
851851
// scheduler.
852-
return Ok(());
852+
Ok(())
853853
}
854854

855855
#[inline]

src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@
3232
clippy::derived_hash_with_manual_eq,
3333
clippy::too_many_arguments,
3434
clippy::type_complexity,
35-
clippy::single_element_loop,
36-
clippy::needless_return,
3735
clippy::bool_to_int_with_if,
38-
clippy::box_default,
3936
clippy::needless_question_mark,
4037
clippy::needless_lifetimes,
4138
clippy::too_long_first_doc_paragraph,

src/shims/alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
7171
// and not execute any Miri shim. Somewhat unintuitively doing so is done
7272
// by returning `NotSupported`, which triggers the `lookup_exported_symbol`
7373
// fallback case in `emulate_foreign_item`.
74-
return Ok(EmulateItemResult::NotSupported);
74+
Ok(EmulateItemResult::NotSupported)
7575
}
7676
AllocatorKind::Default => {
7777
default(this)?;

src/shims/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
103103
fn get_env_var(&mut self, name: &OsStr) -> InterpResult<'tcx, Option<OsString>> {
104104
let this = self.eval_context_ref();
105105
match &this.machine.env_vars {
106-
EnvVars::Uninit => return Ok(None),
106+
EnvVars::Uninit => Ok(None),
107107
EnvVars::Unix(vars) => vars.get(this, name),
108108
EnvVars::Windows(vars) => vars.get(name),
109109
}

src/shims/unix/fd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,12 +676,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
676676
this.write_bytes_ptr(buf, bytes[..read_bytes].iter().copied())?;
677677
// The actual read size is always less than what got originally requested so this cannot fail.
678678
this.write_int(u64::try_from(read_bytes).unwrap(), dest)?;
679-
return Ok(());
679+
Ok(())
680680
}
681681
Err(e) => {
682682
this.set_last_error_from_io_error(e)?;
683683
this.write_int(-1, dest)?;
684-
return Ok(());
684+
Ok(())
685685
}
686686
}
687687
}

src/shims/unix/linux/epoll.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,19 +401,19 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
401401
/// list about file descriptors in the interest list that have some
402402
/// events available. Up to `maxevents` are returned by `epoll_wait()`.
403403
/// The `maxevents` argument must be greater than zero.
404-
404+
///
405405
/// The `timeout` argument specifies the number of milliseconds that
406406
/// `epoll_wait()` will block. Time is measured against the
407407
/// CLOCK_MONOTONIC clock. If the timeout is zero, the function will not block,
408408
/// while if the timeout is -1, the function will block
409409
/// until at least one event has been retrieved (or an error
410410
/// occurred).
411-
411+
///
412412
/// A call to `epoll_wait()` will block until either:
413413
/// • a file descriptor delivers an event;
414414
/// • the call is interrupted by a signal handler; or
415415
/// • the timeout expires.
416-
416+
///
417417
/// Note that the timeout interval will be rounded up to the system
418418
/// clock granularity, and kernel scheduling delays mean that the
419419
/// blocking interval may overrun by a small amount. Specifying a
@@ -596,7 +596,7 @@ fn ready_list_next(
596596
return Some(epoll_event_instance);
597597
}
598598
}
599-
return None;
599+
None
600600
}
601601

602602
/// This helper function checks whether an epoll notification should be triggered for a specific
@@ -623,9 +623,10 @@ fn check_and_update_one_event_interest<'tcx>(
623623
let event_instance = EpollEventInstance::new(flags, epoll_event_interest.data);
624624
// Triggers the notification by inserting it to the ready list.
625625
ready_list.insert(epoll_key, event_instance);
626-
return Ok(true);
626+
Ok(true)
627+
} else {
628+
Ok(false)
627629
}
628-
return Ok(false);
629630
}
630631

631632
/// Callback function after epoll_wait unblocks

src/shims/unix/linux/eventfd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl FileDescription for Event {
110110
/// write either blocks until a read is performed on the
111111
/// file descriptor, or fails with the error EAGAIN if the
112112
/// file descriptor has been made nonblocking.
113-
113+
///
114114
/// A write fails with the error EINVAL if the size of the
115115
/// supplied buffer is less than 8 bytes, or if an attempt is
116116
/// made to write the value 0xffffffffffffffff.

src/shims/windows/foreign_items.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ pub fn is_dyn_sym(name: &str) -> bool {
2323

2424
#[cfg(windows)]
2525
fn win_absolute<'tcx>(path: &Path) -> InterpResult<'tcx, io::Result<PathBuf>> {
26-
// We are on Windows so we can simply lte the host do this.
27-
return Ok(path::absolute(path));
26+
// We are on Windows so we can simply let the host do this.
27+
Ok(path::absolute(path))
2828
}
2929

3030
#[cfg(unix)]

src/shims/windows/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
9090
}
9191
),
9292
);
93-
return Ok(());
93+
Ok(())
9494
}
9595

9696
fn InitOnceComplete(

0 commit comments

Comments
 (0)