Update clippy settings and fix a few clippy warnings.
This commit is contained in:
@@ -37,7 +37,7 @@ use std::{i32, u32};
|
||||
use wasmparser::{MemoryImmediate, Operator};
|
||||
|
||||
// Clippy warns about "flags: _" but its important to document that the flags field is ignored
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(unneeded_field_pattern))]
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::unneeded_field_pattern))]
|
||||
/// Translates wasm operators into Cranelift IR instructions. Returns `true` if it inserted
|
||||
/// a return.
|
||||
pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
|
||||
@@ -894,7 +894,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
|
||||
}
|
||||
|
||||
// Clippy warns us of some fields we are deliberately ignoring
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(unneeded_field_pattern))]
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::unneeded_field_pattern))]
|
||||
/// Deals with a Wasm instruction located in an unreachable portion of the code. Most of them
|
||||
/// are dropped but special ones like `End` or `Else` signal the potential end of the unreachable
|
||||
/// portion so the translation state must be updated accordingly.
|
||||
|
||||
@@ -187,7 +187,7 @@ impl<'dummy_environment> FuncEnvironment for DummyFuncEnvironment<'dummy_environ
|
||||
let vmctx = func.create_global_value(ir::GlobalValueData::VMContext {});
|
||||
GlobalVariable::Memory {
|
||||
gv: vmctx,
|
||||
offset: offset,
|
||||
offset,
|
||||
ty: self.mod_info.globals[index].entity.ty,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ pub trait FuncEnvironment {
|
||||
/// The signature `sig_ref` was previously created by `make_indirect_sig()`.
|
||||
///
|
||||
/// Return the call instruction whose results are the WebAssembly return values.
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))]
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::too_many_arguments))]
|
||||
fn translate_call_indirect(
|
||||
&mut self,
|
||||
pos: FuncCursor,
|
||||
|
||||
@@ -13,10 +13,7 @@
|
||||
#![warn(unused_import_braces)]
|
||||
#![cfg_attr(feature = "std", deny(unstable_features))]
|
||||
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(new_without_default, new_without_default_derive)
|
||||
)]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::new_without_default))]
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
warn(
|
||||
|
||||
Reference in New Issue
Block a user