Silence clippy on FIXME'd code and fix the new lints otherwise

This commit is contained in:
Oli Scherer 2023-07-03 08:15:34 +00:00
parent 707afc389a
commit 6a21b2ddc2
3 changed files with 4 additions and 2 deletions

View file

@ -82,7 +82,7 @@ pub enum MiriCommand {
pub fn escape_for_toml(s: &str) -> String {
// We want to surround this string in quotes `"`. So we first escape all quotes,
// and also all backslashes (that are used to escape quotes).
let s = s.replace('\\', r#"\\"#).replace('"', r#"\""#);
let s = s.replace('\\', r"\\").replace('"', r#"\""#);
format!("\"{s}\"")
}
@ -130,7 +130,7 @@ pub fn exec(mut cmd: Command) -> ! {
{
use std::os::unix::process::CommandExt;
let error = cmd.exec();
Err(error).expect("failed to run command")
panic!("failed to run command: {error}")
}
}

View file

@ -9,6 +9,7 @@
#![feature(local_key_cell_methods)]
#![feature(round_ties_even)]
#![feature(os_str_bytes)]
#![feature(lint_reasons)]
// Configure clippy and other lints
#![allow(
clippy::collapsible_else_if,

View file

@ -181,6 +181,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
/// `EFD_SEMAPHORE` - miri does not support semaphore-like semantics.
///
/// <https://linux.die.net/man/2/eventfd>
#[expect(clippy::needless_if)]
fn eventfd(
&mut self,
val: &OpTy<'tcx, Provenance>,