Update to the rustfmt in rust 1.29, which is now stable.

This commit is contained in:
Dan Gohman
2018-09-13 12:59:25 -07:00
parent f23ea04242
commit 53a0c6c67f
30 changed files with 305 additions and 135 deletions

View File

@@ -1,10 +1,19 @@
#![deny(trivial_numeric_casts)]
#![warn(unused_import_braces, unstable_features, unused_extern_crates)]
#![warn(
unused_import_braces,
unstable_features,
unused_extern_crates
)]
#![cfg_attr(
feature = "cargo-clippy",
warn(
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
unicode_not_nfc, use_self
float_arithmetic,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
unicode_not_nfc,
use_self
)
)]
@@ -153,31 +162,26 @@ fn main() {
.arg(add_time_flag())
.arg(add_input_file_arg())
.arg(add_debug_flag()),
)
.subcommand(
).subcommand(
SubCommand::with_name("cat")
.about("Outputs .clif file")
.arg(add_input_file_arg())
.arg(add_debug_flag()),
)
.subcommand(
).subcommand(
SubCommand::with_name("print-cfg")
.about("Prints out cfg in dot format")
.arg(add_input_file_arg())
.arg(add_debug_flag()),
)
.subcommand(
).subcommand(
add_wasm_or_compile("compile")
.arg(
Arg::with_name("just-decode")
.short("t")
.help("Just decode WebAssembly to Cranelift IR"),
)
.arg(Arg::with_name("check-translation").short("c").help(
).arg(Arg::with_name("check-translation").short("c").help(
"Just checks the correctness of Cranelift IR translated from WebAssembly",
)),
)
.subcommand(add_wasm_or_compile("wasm"))
).subcommand(add_wasm_or_compile("wasm"))
.subcommand(
SubCommand::with_name("pass")
.about("Run specified pass(s) on an input file.")

View File

@@ -16,13 +16,25 @@
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
#![warn(unused_import_braces)]
#![cfg_attr(feature = "std", warn(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 = "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",
warn(
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
print_stdout, unicode_not_nfc, use_self
float_arithmetic,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
print_stdout,
unicode_not_nfc,
use_self
)
)]
// Turns on no_std and alloc features if std is not available.

View File

@@ -99,8 +99,7 @@ impl ArgAssigner for Args {
RU::r14
} else {
RU::rsi
} as RegUnit)
.into()
} as RegUnit).into()
}
// This is SpiderMonkey's `WasmTableCallSigReg`.
ArgumentPurpose::SignatureId => return ArgumentLoc::Reg(RU::r10 as RegUnit).into(),

View File

@@ -569,8 +569,7 @@ pub fn handle_return_abi(inst: Inst, func: &mut Function, cfg: &ControlFlowGraph
rt.purpose == ArgumentPurpose::Link
|| rt.purpose == ArgumentPurpose::StructReturn
|| rt.purpose == ArgumentPurpose::VMContext
})
.count();
}).count();
let abi_args = func.signature.returns.len() - special_args;
let pos = &mut FuncCursor::new(func).at_inst(inst);
@@ -689,8 +688,7 @@ fn spill_call_arguments(pos: &mut FuncCursor) -> bool {
}
_ => None,
}
})
.collect::<Vec<_>>()
}).collect::<Vec<_>>()
};
if arglist.is_empty() {

View File

@@ -3,7 +3,10 @@
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
#![warn(unused_import_braces)]
#![cfg_attr(feature = "std", deny(unstable_features))]
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
#![cfg_attr(
feature = "clippy",
plugin(clippy(conf_file = "../../clippy.toml"))
)]
#![cfg_attr(feature="cargo-clippy", allow(
// This requires Rust 1.27 or later.
duration_subsec,
@@ -32,8 +35,14 @@
#![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
float_arithmetic,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
print_stdout,
unicode_not_nfc,
use_self
)
)]
// Turns on no_std and alloc features if std is not available.

View File

@@ -902,10 +902,9 @@ impl<'a> Context<'a> {
}
Table(jt) => {
let lr = &self.liveness[value];
!lr.is_local()
&& self.cur.func.jump_tables[jt]
.entries()
.any(|(_, ebb)| lr.is_livein(ebb, ctx))
!lr.is_local() && self.cur.func.jump_tables[jt]
.entries()
.any(|(_, ebb)| lr.is_livein(ebb, ctx))
}
}
}

View File

@@ -220,8 +220,7 @@ fn get_or_create<'a>(
func.dfg
.call_signature(inst)
.map(|sig| Affinity::abi(&func.dfg.signatures[sig].returns[rnum], isa))
})
.unwrap_or_default();
}).unwrap_or_default();
}
ValueDef::Param(ebb, num) => {
def = ebb.into();

View File

@@ -463,8 +463,7 @@ impl<'a> Context<'a> {
}
}
None
})
.min_by(|&a, &b| {
}).min_by(|&a, &b| {
// Find the minimum candidate according to the RPO of their defs.
self.domtree.rpo_cmp(
self.cur.func.dfg.value_def(a),

View File

@@ -113,7 +113,8 @@ impl<'a> FlagsVerifier<'a> {
.encinfo
.as_ref()
.and_then(|ei| ei.operand_constraints(self.func.encodings[inst]))
.map_or(false, |c| c.clobbers_flags) && live_val.is_some()
.map_or(false, |c| c.clobbers_flags)
&& live_val.is_some()
{
return fatal!(errors, inst, "encoding clobbers live CPU flags in {}", live);
}

View File

@@ -941,11 +941,11 @@ impl<'a> Verifier<'a> {
);
}
// The defining EBB dominates the instruction using this value.
if is_reachable
&& !self
.expected_domtree
.dominates(ebb, loc_inst, &self.func.layout)
{
if is_reachable && !self.expected_domtree.dominates(
ebb,
loc_inst,
&self.func.layout,
) {
return fatal!(
errors,
loc_inst,
@@ -1039,7 +1039,8 @@ impl<'a> Verifier<'a> {
for (&prev_ebb, &next_ebb) in domtree.cfg_postorder().iter().adjacent_pairs() {
if self
.expected_domtree
.rpo_cmp(prev_ebb, next_ebb, &self.func.layout) != Ordering::Greater
.rpo_cmp(prev_ebb, next_ebb, &self.func.layout)
!= Ordering::Greater
{
return fatal!(
errors,
@@ -1586,8 +1587,8 @@ impl<'a> Verifier<'a> {
let encoding = self.func.encodings[inst];
if encoding.is_legal() {
let mut encodings =
isa.legal_encodings(
let mut encodings = isa
.legal_encodings(
&self.func,
&self.func.dfg[inst],
self.func.dfg.ctrl_typevar(inst),

View File

@@ -32,13 +32,25 @@
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
#![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 = "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",
warn(
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
print_stdout, unicode_not_nfc, use_self
float_arithmetic,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
print_stdout,
unicode_not_nfc,
use_self
)
)]
// Turns on no_std and alloc features if std is not available.

View File

@@ -228,8 +228,7 @@ impl Backend for FaerieBackend {
from: name,
to,
at: u64::from(offset),
})
.map_err(|e| ModuleError::Backend(e.to_string()))?;
}).map_err(|e| ModuleError::Backend(e.to_string()))?;
}
for &(offset, id, addend) in data_relocs {
debug_assert_eq!(
@@ -242,8 +241,7 @@ impl Backend for FaerieBackend {
from: name,
to,
at: u64::from(offset),
})
.map_err(|e| ModuleError::Backend(e.to_string()))?;
}).map_err(|e| ModuleError::Backend(e.to_string()))?;
}
self.artifact
@@ -409,8 +407,7 @@ impl<'a> RelocSink for FaerieRelocSink<'a> {
reloc: raw_reloc,
addend: addend_i32,
},
)
.expect("faerie relocation error");
).expect("faerie relocation error");
}
fn reloc_jt(&mut self, _offset: CodeOffset, _reloc: Reloc, _jt: ir::JumpTable) {

View File

@@ -2,15 +2,32 @@
//!
//! Users of this module should not have to depend on faerie directly.
#![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)]
#![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 = "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",
warn(
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
print_stdout, unicode_not_nfc, use_self
float_arithmetic,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
print_stdout,
unicode_not_nfc,
use_self
)
)]

View File

@@ -106,8 +106,7 @@ fn heartbeat_thread(replies: Sender<Reply>) -> thread::JoinHandle<()> {
while replies.send(Reply::Tick).is_ok() {
thread::sleep(Duration::from_secs(1));
}
})
.unwrap()
}).unwrap()
}
/// Spawn a worker thread running tests.
@@ -154,6 +153,5 @@ fn worker_thread(
// Timing is accumulated independently per thread.
// Timings from this worker thread will be aggregated by `ConcurrentRunner::join()`.
timing::take_current()
})
.unwrap()
}).unwrap()
}

View File

@@ -3,7 +3,12 @@
//! This crate contains the main test driver as well as implementations of the
//! available filetest commands.
#![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)]
#![cfg_attr(feature = "cargo-clippy",
allow(
@@ -13,7 +18,11 @@
#![cfg_attr(
feature = "cargo-clippy",
warn(
mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else, unicode_not_nfc,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
unicode_not_nfc,
use_self
)
)]

View File

@@ -315,8 +315,7 @@ impl TestRunner {
..
} => Some(dur),
_ => None,
})
.collect::<Vec<_>>();
}).collect::<Vec<_>>();
// Get me some real data, kid.
let len = times.len();

View File

@@ -517,11 +517,10 @@ impl<'a> FunctionBuilder<'a> {
None => false,
Some(entry) => self.position.ebb.unwrap() == entry,
};
!is_entry && self.func_ctx.ssa.is_sealed(self.position.ebb.unwrap())
&& !self
.func_ctx
.ssa
.has_any_predecessors(self.position.ebb.unwrap())
!is_entry && self.func_ctx.ssa.is_sealed(self.position.ebb.unwrap()) && !self
.func_ctx
.ssa
.has_any_predecessors(self.position.ebb.unwrap())
}
/// Returns `true` if and only if no instructions have been added since the last call to

View File

@@ -163,8 +163,14 @@
#![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
float_arithmetic,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
print_stdout,
unicode_not_nfc,
use_self
)
)]
#![cfg_attr(not(feature = "std"), no_std)]

View File

@@ -3,13 +3,25 @@
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
#![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 = "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",
warn(
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
print_stdout, unicode_not_nfc, use_self
float_arithmetic,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
print_stdout,
unicode_not_nfc,
use_self
)
)]
// Turns on no_std and alloc features if std is not available.

View File

@@ -129,7 +129,10 @@ pub enum ModuleError {
#[fail(display = "Duplicate definition of identifier: {}", _0)]
DuplicateDefinition(String),
/// Indicates an identifier was defined, but was declared as an import
#[fail(display = "Invalid to define identifier declared as an import: {}", _0)]
#[fail(
display = "Invalid to define identifier declared as an import: {}",
_0
)]
InvalidImportDefinition(String),
/// Wraps a `cranelift-codegen` error
#[fail(display = "Compilation error: {}", _0)]

View File

@@ -1,15 +1,32 @@
//! Performs autodetection of the host for the purposes of running
//! Cranelift to generate code to run on the same machine.
#![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)]
#![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 = "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",
warn(
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
print_stdout, unicode_not_nfc, use_self
float_arithmetic,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
print_stdout,
unicode_not_nfc,
use_self
)
)]
#![cfg_attr(not(feature = "std"), no_std)]

View File

@@ -322,8 +322,7 @@ impl<'a> Lexer<'a> {
.and_then(|(prefix, number)| {
Self::numbered_entity(prefix, number)
.or_else(|| Self::value_type(text, prefix, number))
})
.unwrap_or_else(|| match text {
}).unwrap_or_else(|| match text {
"iflags" => Token::Type(types::IFLAGS),
"fflags" => Token::Type(types::FFLAGS),
_ => Token::Identifier(text),

View File

@@ -3,15 +3,32 @@
//! The `cranelift_reader` library supports reading .clif files. This functionality is needed for
//! testing Cranelift, but is not essential for a JIT compiler.
#![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)]
#![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 = "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",
warn(
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
print_stdout, unicode_not_nfc, use_self
float_arithmetic,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
print_stdout,
unicode_not_nfc,
use_self
)
)]

View File

@@ -969,9 +969,10 @@ impl<'a> Parser<'a> {
self.consume();
match self.token() {
Some(Token::Integer(index_str)) => {
let index: u32 = u32::from_str_radix(index_str, 10).map_err(
|_| self.error("the integer given overflows the u32 type"),
)?;
let index: u32 =
u32::from_str_radix(index_str, 10).map_err(|_| {
self.error("the integer given overflows the u32 type")
})?;
self.consume();
Ok(ExternalName::user(namespace, index))
}
@@ -2557,7 +2558,7 @@ mod tests {
v1 = iadd_imm v3, 17
}",
).parse_function(None)
.unwrap();
.unwrap();
assert_eq!(func.name.to_string(), "%qux");
let v4 = details.map.lookup_str("v4").unwrap();
assert_eq!(v4.to_string(), "v4");
@@ -2633,7 +2634,7 @@ mod tests {
ss1 = spill_slot 1
}",
).parse_function(None)
.unwrap();
.unwrap();
assert_eq!(func.name.to_string(), "%foo");
let mut iter = func.stack_slots.keys();
let _ss0 = iter.next().unwrap();
@@ -2656,8 +2657,8 @@ mod tests {
ss1 = spill_slot 1
}",
).parse_function(None)
.unwrap_err()
.to_string(),
.unwrap_err()
.to_string(),
"3: duplicate entity: ss1"
);
}
@@ -2670,7 +2671,7 @@ mod tests {
ebb4(v3: i32):
}",
).parse_function(None)
.unwrap();
.unwrap();
assert_eq!(func.name.to_string(), "%ebbs");
let mut ebbs = func.layout.ebbs();
@@ -2692,7 +2693,7 @@ mod tests {
ebb0:
return 2",
).parse_function(None)
.unwrap_err();
.unwrap_err();
assert_eq!(location.line_number, 3);
assert_eq!(message, "duplicate entity: ebb0");
@@ -2705,7 +2706,7 @@ mod tests {
jt0 = jump_table 0, 0
jt0 = jump_table 0, 0",
).parse_function(None)
.unwrap_err();
.unwrap_err();
assert_eq!(location.line_number, 3);
assert_eq!(message, "duplicate entity: jt0");
@@ -2718,7 +2719,7 @@ mod tests {
ss0 = explicit_slot 8
ss0 = explicit_slot 8",
).parse_function(None)
.unwrap_err();
.unwrap_err();
assert_eq!(location.line_number, 3);
assert_eq!(message, "duplicate entity: ss0");
@@ -2731,7 +2732,7 @@ mod tests {
gv0 = vmctx
gv0 = vmctx",
).parse_function(None)
.unwrap_err();
.unwrap_err();
assert_eq!(location.line_number, 3);
assert_eq!(message, "duplicate entity: gv0");
@@ -2744,7 +2745,7 @@ mod tests {
heap0 = static gv0, min 0x1000, bound 0x10_0000, guard 0x1000
heap0 = static gv0, min 0x1000, bound 0x10_0000, guard 0x1000",
).parse_function(None)
.unwrap_err();
.unwrap_err();
assert_eq!(location.line_number, 3);
assert_eq!(message, "duplicate entity: heap0");
@@ -2757,7 +2758,7 @@ mod tests {
sig0 = ()
sig0 = ()",
).parse_function(None)
.unwrap_err();
.unwrap_err();
assert_eq!(location.line_number, 3);
assert_eq!(message, "duplicate entity: sig0");
@@ -2771,7 +2772,7 @@ mod tests {
fn0 = %foo sig0
fn0 = %foo sig0",
).parse_function(None)
.unwrap_err();
.unwrap_err();
assert_eq!(location.line_number, 4);
assert_eq!(message, "duplicate entity: fn0");
@@ -2791,7 +2792,7 @@ mod tests {
} ; Trailing.
; More trailing.",
).parse_function(None)
.unwrap();
.unwrap();
assert_eq!(func.name.to_string(), "%comment");
assert_eq!(comments.len(), 8); // no 'before' comment.
assert_eq!(
@@ -2868,7 +2869,7 @@ mod tests {
isa riscv
function %foo() system_v {}",
).unwrap()
.isa_spec
.isa_spec
{
IsaSpec::None(_) => panic!("Expected some ISA"),
IsaSpec::Some(v) => {
@@ -2887,8 +2888,8 @@ mod tests {
trap int_divz
}",
).parse_function(None)
.unwrap()
.0;
.unwrap()
.0;
assert_eq!(func.name.to_string(), "u1:2");
// Invalid characters in the name:

View File

@@ -1,14 +1,30 @@
//! Utility for `cranelift_serde`.
#![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)]
#![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 = "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",
warn(
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
unicode_not_nfc, use_self
float_arithmetic,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
unicode_not_nfc,
use_self
)
)]
@@ -67,8 +83,7 @@ fn main() {
.value_name("FILE")
.help("Input file for serialization"),
),
)
.subcommand(
).subcommand(
SubCommand::with_name("deserialize")
.about("Deserializes Cranelift IR into JSON.")
.arg(
@@ -77,8 +92,7 @@ fn main() {
.value_name("FILE")
.help("Input file for deserialization"),
),
)
.get_matches();
).get_matches();
let res_serde = match matches.subcommand() {
("serialize", Some(m)) => {

View File

@@ -1,14 +1,31 @@
//! Top-level lib.rs for `cranelift_simplejit`.
#![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)]
#![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 = "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",
warn(
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
print_stdout, unicode_not_nfc, use_self
float_arithmetic,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
print_stdout,
unicode_not_nfc,
use_self
)
)]

View File

@@ -1,14 +1,31 @@
//! Cranelift umbrella crate, providing a convenient one-line dependency.
#![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)]
#![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 = "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",
warn(
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
print_stdout, unicode_not_nfc, use_self
float_arithmetic,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
print_stdout,
unicode_not_nfc,
use_self
)
)]

View File

@@ -35,7 +35,11 @@ pub enum WasmError {
///
/// This error code is used by a WebAssembly translator when it encounters invalid WebAssembly
/// code. This should never happen for validated WebAssembly code.
#[fail(display = "Invalid input WebAssembly code at offset {}: {}", _1, _0)]
#[fail(
display = "Invalid input WebAssembly code at offset {}: {}",
_1,
_0
)]
InvalidWebAssembly {
/// A string describing the validation error.
message: &'static str,

View File

@@ -12,13 +12,25 @@
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
#![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 = "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",
warn(
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
print_stdout, unicode_not_nfc, use_self
float_arithmetic,
mut_mut,
nonminimal_bool,
option_map_unwrap_or,
option_map_unwrap_or_else,
print_stdout,
unicode_not_nfc,
use_self
)
)]
#![cfg_attr(not(feature = "std"), no_std)]

View File

@@ -30,8 +30,7 @@ fn testsuite() {
}
}
false
})
.collect();
}).collect();
paths.sort_by_key(|dir| dir.path());
let flags = Flags::new(settings::builder());
for path in paths {