From ff820cacdc2814ddd8e3d0943a4f5ed439154354 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 28 Sep 2024 09:26:44 -0700 Subject: [PATCH] Fix clippy lints on aarch64-apple-darwin This isn't caught in CI because it's in platform-specific code, but allow a few extra lints in platform-specific code since the "noisier than default" stance is not as useful for platform-specific code where we have far less control over integral types. --- crates/wasmtime/src/runtime/vm/sys/unix/machports.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs b/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs index 3d65b25d2c1..2fa03535507 100644 --- a/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs +++ b/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs @@ -31,7 +31,14 @@ //! function declarations. Many bits and pieces are copied or translated from //! the SpiderMonkey implementation and it should pass all the tests! -#![allow(non_snake_case, clippy::cast_sign_loss)] +#![allow( + // FFI bindings here for C/etc don't follow Rust's naming conventions. + non_snake_case, + // Platform-specific code has a lot of false positives with these lints so + // like Unix disable the lints for this module. + clippy::cast_sign_loss, + clippy::cast_possible_truncation +)] use crate::runtime::module::lookup_code; use crate::runtime::vm::sys::traphandlers::wasmtime_longjmp;