Enable and fix several more clippy lints.
This commit is contained in:
@@ -949,7 +949,7 @@ fn get_heap_addr(
|
||||
heap: ir::Heap,
|
||||
addr32: ir::Value,
|
||||
offset: u32,
|
||||
addr_ty: ir::Type,
|
||||
addr_ty: Type,
|
||||
builder: &mut FunctionBuilder<Variable>,
|
||||
) -> (ir::Value, i32) {
|
||||
use std::cmp::min;
|
||||
@@ -985,7 +985,7 @@ fn get_heap_addr(
|
||||
fn translate_load<FE: FuncEnvironment + ?Sized>(
|
||||
offset: u32,
|
||||
opcode: ir::Opcode,
|
||||
result_ty: ir::Type,
|
||||
result_ty: Type,
|
||||
builder: &mut FunctionBuilder<Variable>,
|
||||
state: &mut TranslationState,
|
||||
environ: &mut FE,
|
||||
|
||||
@@ -226,7 +226,7 @@ impl<'dummy_environment> FuncEnvironment for DummyFuncEnvironment<'dummy_environ
|
||||
args.push(vmctx, &mut pos.func.dfg.value_lists);
|
||||
|
||||
pos.ins()
|
||||
.CallIndirect(ir::Opcode::CallIndirect, ir::types::VOID, sig_ref, args)
|
||||
.CallIndirect(ir::Opcode::CallIndirect, VOID, sig_ref, args)
|
||||
.0
|
||||
}
|
||||
|
||||
@@ -248,9 +248,7 @@ impl<'dummy_environment> FuncEnvironment for DummyFuncEnvironment<'dummy_environ
|
||||
args.extend(call_args.iter().cloned(), &mut pos.func.dfg.value_lists);
|
||||
args.push(vmctx, &mut pos.func.dfg.value_lists);
|
||||
|
||||
pos.ins()
|
||||
.Call(ir::Opcode::Call, ir::types::VOID, callee, args)
|
||||
.0
|
||||
pos.ins().Call(ir::Opcode::Call, VOID, callee, args).0
|
||||
}
|
||||
|
||||
fn translate_grow_memory(
|
||||
|
||||
@@ -10,8 +10,20 @@
|
||||
//! The main function of this module is [`translate_module`](fn.translate_module.html).
|
||||
|
||||
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
|
||||
#![warn(unused_import_braces, unstable_features)]
|
||||
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(new_without_default, redundant_field_names))]
|
||||
#![cfg_attr(feature = "cargo-clippy",
|
||||
allow(new_without_default, new_without_default_derive))]
|
||||
#![cfg_attr(feature="cargo-clippy", warn(
|
||||
float_arithmetic,
|
||||
mut_mut,
|
||||
nonminimal_bool,
|
||||
option_map_unwrap_or,
|
||||
option_map_unwrap_or_else,
|
||||
print_stdout,
|
||||
unicode_not_nfc,
|
||||
use_self,
|
||||
))]
|
||||
|
||||
#[macro_use(dbg)]
|
||||
extern crate cretonne_codegen;
|
||||
|
||||
@@ -241,8 +241,8 @@ pub fn parse_global_section(
|
||||
}
|
||||
let global = Global {
|
||||
ty: type_to_type(&content_type).unwrap(),
|
||||
mutability: mutability,
|
||||
initializer: initializer,
|
||||
mutability,
|
||||
initializer,
|
||||
};
|
||||
environ.declare_global(global);
|
||||
match *parser.read() {
|
||||
|
||||
Reference in New Issue
Block a user