Skip to content

Commit

Permalink
Auto merge of rust-lang#3916 - rust-lang:rustup-2024-09-26, r=RalfJung
Browse files Browse the repository at this point in the history
Automatic Rustup
  • Loading branch information
bors committed Sep 26, 2024
2 parents fa6fa91 + e435638 commit 36ae133
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 21 deletions.
2 changes: 2 additions & 0 deletions cargo-miri/src/phases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,8 @@ pub fn phase_runner(mut binary_args: impl Iterator<Item = String>, 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.
Expand Down
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1b5aa96d6016bafe50e071b45d4d2e3c90fd766f
76ed7a1fa40c3f54d3fd3f834e12bf9c932d0146
2 changes: 1 addition & 1 deletion src/borrow_tracker/stacked_borrows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/concurrency/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
}
),
);
return Ok(());
Ok(())
}

/// Wake up some thread (if there is any) sleeping on the conditional
Expand Down
2 changes: 1 addition & 1 deletion src/concurrency/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> {
// https://github.com/rust-lang/miri/issues/1763). In this case,
// just do nothing, which effectively just returns to the
// scheduler.
return Ok(());
Ok(())
}

#[inline]
Expand Down
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@
clippy::derived_hash_with_manual_eq,
clippy::too_many_arguments,
clippy::type_complexity,
clippy::single_element_loop,
clippy::needless_return,
clippy::bool_to_int_with_if,
clippy::box_default,
clippy::needless_question_mark,
clippy::needless_lifetimes,
clippy::too_long_first_doc_paragraph,
Expand Down
2 changes: 1 addition & 1 deletion src/shims/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
// and not execute any Miri shim. Somewhat unintuitively doing so is done
// by returning `NotSupported`, which triggers the `lookup_exported_symbol`
// fallback case in `emulate_foreign_item`.
return Ok(EmulateItemResult::NotSupported);
Ok(EmulateItemResult::NotSupported)
}
AllocatorKind::Default => {
default(this)?;
Expand Down
2 changes: 1 addition & 1 deletion src/shims/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
fn get_env_var(&mut self, name: &OsStr) -> InterpResult<'tcx, Option<OsString>> {
let this = self.eval_context_ref();
match &this.machine.env_vars {
EnvVars::Uninit => return Ok(None),
EnvVars::Uninit => Ok(None),
EnvVars::Unix(vars) => vars.get(this, name),
EnvVars::Windows(vars) => vars.get(name),
}
Expand Down
4 changes: 2 additions & 2 deletions src/shims/unix/fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,12 +676,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
this.write_bytes_ptr(buf, bytes[..read_bytes].iter().copied())?;
// The actual read size is always less than what got originally requested so this cannot fail.
this.write_int(u64::try_from(read_bytes).unwrap(), dest)?;
return Ok(());
Ok(())
}
Err(e) => {
this.set_last_error_from_io_error(e)?;
this.write_int(-1, dest)?;
return Ok(());
Ok(())
}
}
}
Expand Down
13 changes: 7 additions & 6 deletions src/shims/unix/linux/epoll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -596,7 +596,7 @@ fn ready_list_next(
return Some(epoll_event_instance);
}
}
return None;
None
}

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

/// Callback function after epoll_wait unblocks
Expand Down
2 changes: 1 addition & 1 deletion src/shims/unix/linux/eventfd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/shims/windows/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ pub fn is_dyn_sym(name: &str) -> bool {

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

#[cfg(unix)]
Expand Down
2 changes: 1 addition & 1 deletion src/shims/windows/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
}
),
);
return Ok(());
Ok(())
}

fn InitOnceComplete(
Expand Down

0 comments on commit 36ae133

Please sign in to comment.