From f27e0ad53cdd4749f5b603c63ba8bedb97e4e15c Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Mon, 28 Oct 2019 03:42:46 -0700 Subject: [PATCH] wasmtime-wasi-c: allow(non_snake_case) to suppress warnings on consecutive underscores (#461) wasmtime-wasi-c contains many bindgen-generated symbols like bindgen_test_layout___wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t that contain triple-underscores in them. rustc doesn't consider those names snake-case and generates extensive warnings about them. Suppress those warnings with allow(non_snake_case). --- wasmtime-wasi-c/src/host.rs | 2 +- wasmtime-wasi-c/src/wasm32.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wasmtime-wasi-c/src/host.rs b/wasmtime-wasi-c/src/host.rs index 918ea92f5e..152531794e 100644 --- a/wasmtime-wasi-c/src/host.rs +++ b/wasmtime-wasi-c/src/host.rs @@ -1,4 +1,4 @@ -#![allow(non_camel_case_types, dead_code)] +#![allow(non_camel_case_types, non_snake_case, dead_code)] include!(concat!(env!("OUT_DIR"), "/wasmtime_ssp.rs")); diff --git a/wasmtime-wasi-c/src/wasm32.rs b/wasmtime-wasi-c/src/wasm32.rs index c674e21cfe..26f8b35ba8 100644 --- a/wasmtime-wasi-c/src/wasm32.rs +++ b/wasmtime-wasi-c/src/wasm32.rs @@ -6,6 +6,7 @@ //! and to #![allow(non_camel_case_types)] +#![allow(non_snake_case)] #![allow(dead_code)] // C types