Update to the rustfmt in rust 1.29, which is now stable.
This commit is contained in:
@@ -3,15 +3,32 @@
|
|||||||
//! the translation the base addresses of regions of memory that will hold the globals, tables and
|
//! the translation the base addresses of regions of memory that will hold the globals, tables and
|
||||||
//! linear memories.
|
//! linear memories.
|
||||||
|
|
||||||
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates, unstable_features)]
|
#![deny(
|
||||||
|
missing_docs,
|
||||||
|
trivial_numeric_casts,
|
||||||
|
unused_extern_crates,
|
||||||
|
unstable_features
|
||||||
|
)]
|
||||||
#![warn(unused_import_braces)]
|
#![warn(unused_import_braces)]
|
||||||
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
|
#![cfg_attr(
|
||||||
#![cfg_attr(feature = "cargo-clippy", allow(new_without_default, new_without_default_derive))]
|
feature = "clippy",
|
||||||
|
plugin(clippy(conf_file = "../../clippy.toml"))
|
||||||
|
)]
|
||||||
|
#![cfg_attr(
|
||||||
|
feature = "cargo-clippy",
|
||||||
|
allow(new_without_default, new_without_default_derive)
|
||||||
|
)]
|
||||||
#![cfg_attr(
|
#![cfg_attr(
|
||||||
feature = "cargo-clippy",
|
feature = "cargo-clippy",
|
||||||
warn(
|
warn(
|
||||||
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
|
float_arithmetic,
|
||||||
print_stdout, unicode_not_nfc, use_self
|
mut_mut,
|
||||||
|
nonminimal_bool,
|
||||||
|
option_map_unwrap_or,
|
||||||
|
option_map_unwrap_or_else,
|
||||||
|
print_stdout,
|
||||||
|
unicode_not_nfc,
|
||||||
|
use_self
|
||||||
)
|
)
|
||||||
)]
|
)]
|
||||||
|
|
||||||
|
|||||||
@@ -140,9 +140,10 @@ pub fn execute(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let code_buf = &compilation.functions[module.defined_func_index(start_index).expect(
|
let code_buf =
|
||||||
"imported start functions not supported yet",
|
&compilation.functions[module
|
||||||
)];
|
.defined_func_index(start_index)
|
||||||
|
.expect("imported start functions not supported yet")];
|
||||||
|
|
||||||
// Collect all memory base addresses and Vec.
|
// Collect all memory base addresses and Vec.
|
||||||
let mut mem_base_addrs = instance
|
let mut mem_base_addrs = instance
|
||||||
|
|||||||
@@ -1,14 +1,31 @@
|
|||||||
//! JIT-style runtime for WebAssembly using Cranelift.
|
//! JIT-style runtime for WebAssembly using Cranelift.
|
||||||
|
|
||||||
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates, unstable_features)]
|
#![deny(
|
||||||
|
missing_docs,
|
||||||
|
trivial_numeric_casts,
|
||||||
|
unused_extern_crates,
|
||||||
|
unstable_features
|
||||||
|
)]
|
||||||
#![warn(unused_import_braces)]
|
#![warn(unused_import_braces)]
|
||||||
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
|
#![cfg_attr(
|
||||||
#![cfg_attr(feature = "cargo-clippy", allow(new_without_default, new_without_default_derive))]
|
feature = "clippy",
|
||||||
|
plugin(clippy(conf_file = "../../clippy.toml"))
|
||||||
|
)]
|
||||||
|
#![cfg_attr(
|
||||||
|
feature = "cargo-clippy",
|
||||||
|
allow(new_without_default, new_without_default_derive)
|
||||||
|
)]
|
||||||
#![cfg_attr(
|
#![cfg_attr(
|
||||||
feature = "cargo-clippy",
|
feature = "cargo-clippy",
|
||||||
warn(
|
warn(
|
||||||
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
|
float_arithmetic,
|
||||||
print_stdout, unicode_not_nfc, use_self
|
mut_mut,
|
||||||
|
nonminimal_bool,
|
||||||
|
option_map_unwrap_or,
|
||||||
|
option_map_unwrap_or_else,
|
||||||
|
print_stdout,
|
||||||
|
unicode_not_nfc,
|
||||||
|
use_self
|
||||||
)
|
)
|
||||||
)]
|
)]
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,31 @@
|
|||||||
//! Object-file writing library using the wasmtime environment.
|
//! Object-file writing library using the wasmtime environment.
|
||||||
|
|
||||||
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates, unstable_features)]
|
#![deny(
|
||||||
|
missing_docs,
|
||||||
|
trivial_numeric_casts,
|
||||||
|
unused_extern_crates,
|
||||||
|
unstable_features
|
||||||
|
)]
|
||||||
#![warn(unused_import_braces)]
|
#![warn(unused_import_braces)]
|
||||||
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
|
#![cfg_attr(
|
||||||
#![cfg_attr(feature = "cargo-clippy", allow(new_without_default, new_without_default_derive))]
|
feature = "clippy",
|
||||||
|
plugin(clippy(conf_file = "../../clippy.toml"))
|
||||||
|
)]
|
||||||
|
#![cfg_attr(
|
||||||
|
feature = "cargo-clippy",
|
||||||
|
allow(new_without_default, new_without_default_derive)
|
||||||
|
)]
|
||||||
#![cfg_attr(
|
#![cfg_attr(
|
||||||
feature = "cargo-clippy",
|
feature = "cargo-clippy",
|
||||||
warn(
|
warn(
|
||||||
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
|
float_arithmetic,
|
||||||
print_stdout, unicode_not_nfc, use_self
|
mut_mut,
|
||||||
|
nonminimal_bool,
|
||||||
|
option_map_unwrap_or,
|
||||||
|
option_map_unwrap_or_else,
|
||||||
|
print_stdout,
|
||||||
|
unicode_not_nfc,
|
||||||
|
use_self
|
||||||
)
|
)
|
||||||
)]
|
)]
|
||||||
|
|
||||||
|
|||||||
29
src/main.rs
29
src/main.rs
@@ -5,15 +5,31 @@
|
|||||||
//! IL. Can also executes the `start` function of the module by laying out the memories, globals
|
//! IL. Can also executes the `start` function of the module by laying out the memories, globals
|
||||||
//! and tables, then emitting the translated code with hardcoded addresses to memory.
|
//! and tables, then emitting the translated code with hardcoded addresses to memory.
|
||||||
|
|
||||||
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates, unstable_features)]
|
#![deny(
|
||||||
|
missing_docs,
|
||||||
|
trivial_numeric_casts,
|
||||||
|
unused_extern_crates,
|
||||||
|
unstable_features
|
||||||
|
)]
|
||||||
#![warn(unused_import_braces)]
|
#![warn(unused_import_braces)]
|
||||||
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
|
#![cfg_attr(
|
||||||
#![cfg_attr(feature = "cargo-clippy", allow(new_without_default, new_without_default_derive))]
|
feature = "clippy",
|
||||||
|
plugin(clippy(conf_file = "../../clippy.toml"))
|
||||||
|
)]
|
||||||
|
#![cfg_attr(
|
||||||
|
feature = "cargo-clippy",
|
||||||
|
allow(new_without_default, new_without_default_derive)
|
||||||
|
)]
|
||||||
#![cfg_attr(
|
#![cfg_attr(
|
||||||
feature = "cargo-clippy",
|
feature = "cargo-clippy",
|
||||||
warn(
|
warn(
|
||||||
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
|
float_arithmetic,
|
||||||
unicode_not_nfc, use_self
|
mut_mut,
|
||||||
|
nonminimal_bool,
|
||||||
|
option_map_unwrap_or,
|
||||||
|
option_map_unwrap_or_else,
|
||||||
|
unicode_not_nfc,
|
||||||
|
use_self
|
||||||
)
|
)
|
||||||
)]
|
)]
|
||||||
|
|
||||||
@@ -78,8 +94,7 @@ fn main() {
|
|||||||
d.help(true)
|
d.help(true)
|
||||||
.version(Some(String::from("0.0.0")))
|
.version(Some(String::from("0.0.0")))
|
||||||
.deserialize()
|
.deserialize()
|
||||||
})
|
}).unwrap_or_else(|e| e.exit());
|
||||||
.unwrap_or_else(|e| e.exit());
|
|
||||||
let (mut flag_builder, isa_builder) = cranelift_native::builders().unwrap_or_else(|_| {
|
let (mut flag_builder, isa_builder) = cranelift_native::builders().unwrap_or_else(|_| {
|
||||||
panic!("host machine is not a supported target");
|
panic!("host machine is not a supported target");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,15 +4,31 @@
|
|||||||
//! IL, then translates it to native code, and writes it out to a native
|
//! IL, then translates it to native code, and writes it out to a native
|
||||||
//! object file with relocations.
|
//! object file with relocations.
|
||||||
|
|
||||||
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates, unstable_features)]
|
#![deny(
|
||||||
|
missing_docs,
|
||||||
|
trivial_numeric_casts,
|
||||||
|
unused_extern_crates,
|
||||||
|
unstable_features
|
||||||
|
)]
|
||||||
#![warn(unused_import_braces)]
|
#![warn(unused_import_braces)]
|
||||||
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
|
#![cfg_attr(
|
||||||
#![cfg_attr(feature = "cargo-clippy", allow(new_without_default, new_without_default_derive))]
|
feature = "clippy",
|
||||||
|
plugin(clippy(conf_file = "../../clippy.toml"))
|
||||||
|
)]
|
||||||
|
#![cfg_attr(
|
||||||
|
feature = "cargo-clippy",
|
||||||
|
allow(new_without_default, new_without_default_derive)
|
||||||
|
)]
|
||||||
#![cfg_attr(
|
#![cfg_attr(
|
||||||
feature = "cargo-clippy",
|
feature = "cargo-clippy",
|
||||||
warn(
|
warn(
|
||||||
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
|
float_arithmetic,
|
||||||
unicode_not_nfc, use_self
|
mut_mut,
|
||||||
|
nonminimal_bool,
|
||||||
|
option_map_unwrap_or,
|
||||||
|
option_map_unwrap_or_else,
|
||||||
|
unicode_not_nfc,
|
||||||
|
use_self
|
||||||
)
|
)
|
||||||
)]
|
)]
|
||||||
|
|
||||||
@@ -74,8 +90,7 @@ fn main() {
|
|||||||
d.help(true)
|
d.help(true)
|
||||||
.version(Some(String::from("0.0.0")))
|
.version(Some(String::from("0.0.0")))
|
||||||
.deserialize()
|
.deserialize()
|
||||||
})
|
}).unwrap_or_else(|e| e.exit());
|
||||||
.unwrap_or_else(|e| e.exit());
|
|
||||||
|
|
||||||
let path = Path::new(&args.arg_file);
|
let path = Path::new(&args.arg_file);
|
||||||
match handle_module(path.to_path_buf(), &args.arg_output) {
|
match handle_module(path.to_path_buf(), &args.arg_output) {
|
||||||
|
|||||||
Reference in New Issue
Block a user