Skip to content

Commit 6a21b2d

Browse files
committed
Silence clippy on FIXME'd code and fix the new lints otherwise
1 parent 707afc3 commit 6a21b2d

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/tools/miri/cargo-miri/src/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub enum MiriCommand {
8282
pub fn escape_for_toml(s: &str) -> String {
8383
// We want to surround this string in quotes `"`. So we first escape all quotes,
8484
// and also all backslashes (that are used to escape quotes).
85-
let s = s.replace('\\', r#"\\"#).replace('"', r#"\""#);
85+
let s = s.replace('\\', r"\\").replace('"', r#"\""#);
8686
format!("\"{s}\"")
8787
}
8888

@@ -130,7 +130,7 @@ pub fn exec(mut cmd: Command) -> ! {
130130
{
131131
use std::os::unix::process::CommandExt;
132132
let error = cmd.exec();
133-
Err(error).expect("failed to run command")
133+
panic!("failed to run command: {error}")
134134
}
135135
}
136136

src/tools/miri/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#![feature(local_key_cell_methods)]
1010
#![feature(round_ties_even)]
1111
#![feature(os_str_bytes)]
12+
#![feature(lint_reasons)]
1213
// Configure clippy and other lints
1314
#![allow(
1415
clippy::collapsible_else_if,

src/tools/miri/src/shims/unix/linux/fd.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
181181
/// `EFD_SEMAPHORE` - miri does not support semaphore-like semantics.
182182
///
183183
/// <https://linux.die.net/man/2/eventfd>
184+
#[expect(clippy::needless_if)]
184185
fn eventfd(
185186
&mut self,
186187
val: &OpTy<'tcx, Provenance>,

0 commit comments

Comments
 (0)