Update to the latest stable rustfmt, 0.4.2-stable (febbb36 2018-04-12).
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
//! Read a sequence of Cretonne IR files and print them again to stdout. This has the effect of
|
||||
//! normalizing formatting and removing comments.
|
||||
|
||||
use CommandResult;
|
||||
use cretonne_reader::parse_functions;
|
||||
use utils::read_to_string;
|
||||
use CommandResult;
|
||||
|
||||
pub fn run(files: &[String]) -> CommandResult {
|
||||
for (i, f) in files.into_iter().enumerate() {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//! CLI tool to read Cretonne IR files and compile them into native code.
|
||||
|
||||
use capstone::prelude::*;
|
||||
use cretonne_codegen::Context;
|
||||
use cretonne_codegen::isa::TargetIsa;
|
||||
use cretonne_codegen::print_errors::pretty_error;
|
||||
use cretonne_codegen::settings::FlagsOrIsa;
|
||||
use cretonne_codegen::Context;
|
||||
use cretonne_codegen::{binemit, ir};
|
||||
use cretonne_reader::parse_test;
|
||||
use std::path::Path;
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
#![deny(trivial_numeric_casts)]
|
||||
#![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))]
|
||||
#![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
|
||||
)
|
||||
)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate cfg_if;
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
//! Read a series of Cretonne IR files and print their control flow graphs
|
||||
//! in graphviz format.
|
||||
|
||||
use CommandResult;
|
||||
use cretonne_codegen::cfg_printer::CFGPrinter;
|
||||
use cretonne_reader::parse_functions;
|
||||
use utils::read_to_string;
|
||||
use CommandResult;
|
||||
|
||||
pub fn run(files: &[String]) -> CommandResult {
|
||||
for (i, f) in files.into_iter().enumerate() {
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
//!
|
||||
//! This file is named to avoid a name collision with the filecheck crate.
|
||||
|
||||
use CommandResult;
|
||||
use filecheck::{Checker, CheckerBuilder, NO_VARIABLES};
|
||||
use std::io::{self, Read};
|
||||
use utils::read_to_string;
|
||||
use CommandResult;
|
||||
|
||||
pub fn run(files: &[String], verbose: bool) -> CommandResult {
|
||||
if files.is_empty() {
|
||||
|
||||
@@ -184,8 +184,8 @@ pub fn legalize_abi_value(have: Type, arg: &AbiParam) -> ValueConversion {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use ir::AbiParam;
|
||||
use ir::types;
|
||||
use ir::AbiParam;
|
||||
|
||||
#[test]
|
||||
fn legalize() {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
use std::fmt::{Display, Formatter, Result, Write};
|
||||
|
||||
use flowgraph::ControlFlowGraph;
|
||||
use ir::Function;
|
||||
use ir::instructions::BranchInfo;
|
||||
use ir::Function;
|
||||
|
||||
/// A utility for pretty-printing the CFG of a `Function`.
|
||||
pub struct CFGPrinter<'a> {
|
||||
|
||||
@@ -220,8 +220,8 @@ pub fn magicS64(d: i64) -> MS64 {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{MS32, MS64, MU32, MU64};
|
||||
use super::{magicS32, magicS64, magicU32, magicU64};
|
||||
use super::{MS32, MS64, MU32, MU64};
|
||||
|
||||
fn mkMU32(mulBy: u32, doAdd: bool, shiftBy: i32) -> MU32 {
|
||||
MU32 {
|
||||
|
||||
@@ -1151,8 +1151,8 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn aliases() {
|
||||
use ir::InstBuilder;
|
||||
use ir::condcodes::IntCC;
|
||||
use ir::InstBuilder;
|
||||
|
||||
let mut func = Function::new();
|
||||
let ebb0 = func.dfg.make_ebb();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Heaps.
|
||||
|
||||
use ir::GlobalVar;
|
||||
use ir::immediates::Imm64;
|
||||
use ir::GlobalVar;
|
||||
use std::fmt;
|
||||
|
||||
/// Information about a heap declaration.
|
||||
|
||||
@@ -338,8 +338,8 @@ impl StackSlots {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use ir::Function;
|
||||
use ir::types;
|
||||
use ir::Function;
|
||||
use std::string::ToString;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -9,8 +9,8 @@ pub mod settings;
|
||||
use super::super::settings as shared_settings;
|
||||
use binemit::{emit_function, CodeSink, MemoryCodeSink};
|
||||
use ir;
|
||||
use isa::Builder as IsaBuilder;
|
||||
use isa::enc_tables::{self as shared_enc_tables, lookup_enclist, Encodings};
|
||||
use isa::Builder as IsaBuilder;
|
||||
use isa::{EncInfo, RegClass, RegInfo, TargetIsa};
|
||||
use regalloc;
|
||||
use std::boxed::Box;
|
||||
|
||||
@@ -9,8 +9,8 @@ pub mod settings;
|
||||
use super::super::settings as shared_settings;
|
||||
use binemit::{emit_function, CodeSink, MemoryCodeSink};
|
||||
use ir;
|
||||
use isa::Builder as IsaBuilder;
|
||||
use isa::enc_tables::{lookup_enclist, Encodings};
|
||||
use isa::Builder as IsaBuilder;
|
||||
use isa::{EncInfo, RegClass, RegInfo, TargetIsa};
|
||||
use regalloc;
|
||||
use std::boxed::Box;
|
||||
|
||||
@@ -9,8 +9,8 @@ pub mod settings;
|
||||
use super::super::settings as shared_settings;
|
||||
use binemit::{emit_function, CodeSink, MemoryCodeSink};
|
||||
use ir;
|
||||
use isa::Builder as IsaBuilder;
|
||||
use isa::enc_tables::{self as shared_enc_tables, lookup_enclist, Encodings};
|
||||
use isa::Builder as IsaBuilder;
|
||||
use isa::{EncInfo, RegClass, RegInfo, TargetIsa};
|
||||
use regalloc;
|
||||
use std::boxed::Box;
|
||||
@@ -113,8 +113,8 @@ impl TargetIsa for Isa {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ir::{Function, InstructionData, Opcode};
|
||||
use ir::{immediates, types};
|
||||
use ir::{Function, InstructionData, Opcode};
|
||||
use isa;
|
||||
use settings::{self, Configurable};
|
||||
use std::string::{String, ToString};
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
//! defined in this module expresses the low-level details of accessing a stack slot from an
|
||||
//! encoded instruction.
|
||||
|
||||
use ir::StackSlot;
|
||||
use ir::stackslot::{StackOffset, StackSlotKind, StackSlots};
|
||||
use ir::StackSlot;
|
||||
|
||||
/// A method for referencing a stack slot in the current stack frame.
|
||||
///
|
||||
|
||||
@@ -9,8 +9,8 @@ pub mod settings;
|
||||
use super::super::settings as shared_settings;
|
||||
use binemit::{emit_function, CodeSink, MemoryCodeSink};
|
||||
use ir;
|
||||
use isa::Builder as IsaBuilder;
|
||||
use isa::enc_tables::{self as shared_enc_tables, lookup_enclist, Encodings};
|
||||
use isa::Builder as IsaBuilder;
|
||||
use isa::{EncInfo, RegClass, RegInfo, TargetIsa};
|
||||
use regalloc;
|
||||
use result;
|
||||
|
||||
@@ -31,9 +31,13 @@
|
||||
redundant_field_names,
|
||||
useless_let_if_seq,
|
||||
len_without_is_empty))]
|
||||
#![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))]
|
||||
#![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
|
||||
)
|
||||
)]
|
||||
// Turns on no_std and alloc features if std is not available.
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![cfg_attr(not(feature = "std"), feature(alloc))]
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use cursor::{Cursor, FuncCursor};
|
||||
use divconst_magic_numbers::{MS32, MS64, MU32, MU64};
|
||||
use divconst_magic_numbers::{magicS32, magicS64, magicU32, magicU64};
|
||||
use ir::Inst;
|
||||
use divconst_magic_numbers::{MS32, MS64, MU32, MU64};
|
||||
use ir::dfg::ValueDef;
|
||||
use ir::instructions::Opcode;
|
||||
use ir::types::{I32, I64};
|
||||
use ir::Inst;
|
||||
use ir::{DataFlowGraph, Function, InstBuilder, InstructionData, Type, Value};
|
||||
use timing;
|
||||
|
||||
|
||||
@@ -46,16 +46,16 @@ use cursor::{Cursor, EncCursor};
|
||||
use dominator_tree::DominatorTree;
|
||||
use ir::{AbiParam, ArgumentLoc, InstBuilder, ValueDef};
|
||||
use ir::{Ebb, Function, Inst, Layout, SigRef, Value, ValueLoc};
|
||||
use isa::{ConstraintKind, EncInfo, OperandConstraint, RecipeConstraints, TargetIsa};
|
||||
use isa::{regs_overlap, RegClass, RegInfo, RegUnit};
|
||||
use isa::{ConstraintKind, EncInfo, OperandConstraint, RecipeConstraints, TargetIsa};
|
||||
use packed_option::PackedOption;
|
||||
use regalloc::RegDiversions;
|
||||
use regalloc::affinity::Affinity;
|
||||
use regalloc::live_value_tracker::{LiveValue, LiveValueTracker};
|
||||
use regalloc::liveness::Liveness;
|
||||
use regalloc::liverange::{LiveRange, LiveRangeContext};
|
||||
use regalloc::register_set::RegisterSet;
|
||||
use regalloc::solver::{Solver, SolverError};
|
||||
use regalloc::RegDiversions;
|
||||
use std::mem;
|
||||
use timing;
|
||||
|
||||
|
||||
@@ -1367,7 +1367,7 @@ mod tests {
|
||||
mov(v15, gpr, r5, r3),
|
||||
mov(v14, gpr, r4, r5),
|
||||
mov(v13, gpr, r1, r4),
|
||||
fill(v10, gpr, 0, r1) // Finally complete cycle 1.
|
||||
fill(v10, gpr, 0, r1), // Finally complete cycle 1.
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Computing stack layout.
|
||||
|
||||
use ir::StackSlots;
|
||||
use ir::stackslot::{StackOffset, StackSize, StackSlotKind};
|
||||
use ir::StackSlots;
|
||||
use result::CtonError;
|
||||
use std::cmp::{max, min};
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
use ir;
|
||||
use isa;
|
||||
use regalloc::RegDiversions;
|
||||
use regalloc::liveness::Liveness;
|
||||
use regalloc::RegDiversions;
|
||||
use timing;
|
||||
use verifier::Result;
|
||||
|
||||
|
||||
@@ -1147,8 +1147,8 @@ impl<'a> Verifier<'a> {
|
||||
mod tests {
|
||||
use super::{Error, Verifier};
|
||||
use entity::EntityList;
|
||||
use ir::Function;
|
||||
use ir::instructions::{InstructionData, Opcode};
|
||||
use ir::Function;
|
||||
use settings;
|
||||
|
||||
macro_rules! assert_err_with_msg {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//! A double-ended iterator over entity references and entities.
|
||||
|
||||
use EntityRef;
|
||||
use std::iter::Enumerate;
|
||||
use std::marker::PhantomData;
|
||||
use std::slice;
|
||||
use EntityRef;
|
||||
|
||||
/// Iterate over all keys in order.
|
||||
pub struct Iter<'a, K: EntityRef, V>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
//! When `std::iter::Step` is stablized, `Keys` could be implemented as a wrapper around
|
||||
//! `std::ops::Range`, but for now, we implment it manually.
|
||||
|
||||
use EntityRef;
|
||||
use std::marker::PhantomData;
|
||||
use EntityRef;
|
||||
|
||||
/// Iterate over all keys in order.
|
||||
pub struct Keys<K: EntityRef> {
|
||||
|
||||
@@ -34,9 +34,13 @@
|
||||
#![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 = "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))]
|
||||
#![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
|
||||
)
|
||||
)]
|
||||
// Turns on no_std and alloc features if std is not available.
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![cfg_attr(not(feature = "std"), feature(alloc))]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//! Small lists of entity references.
|
||||
use EntityRef;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::marker::PhantomData;
|
||||
use std::mem;
|
||||
use std::vec::Vec;
|
||||
use EntityRef;
|
||||
|
||||
/// A small list of entity references allocated from a pool.
|
||||
///
|
||||
|
||||
@@ -6,9 +6,13 @@
|
||||
#![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, 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))]
|
||||
#![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
|
||||
)
|
||||
)]
|
||||
|
||||
extern crate cretonne_codegen;
|
||||
extern crate cretonne_module;
|
||||
|
||||
@@ -9,9 +9,13 @@
|
||||
type_complexity,
|
||||
// Rustfmt 0.9.0 is at odds with this lint:
|
||||
block_in_if_condition_stmt))]
|
||||
#![cfg_attr(feature = "cargo-clippy",
|
||||
warn(mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else,
|
||||
unicode_not_nfc, use_self))]
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
warn(
|
||||
mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else, unicode_not_nfc,
|
||||
use_self
|
||||
)
|
||||
)]
|
||||
|
||||
#[macro_use(dbg)]
|
||||
extern crate cretonne_codegen;
|
||||
|
||||
@@ -6,8 +6,8 @@ use cretonne_codegen::print_errors::pretty_verifier_error;
|
||||
use cretonne_codegen::settings::Flags;
|
||||
use cretonne_codegen::timing;
|
||||
use cretonne_codegen::verify_function;
|
||||
use cretonne_reader::IsaSpec;
|
||||
use cretonne_reader::parse_test;
|
||||
use cretonne_reader::IsaSpec;
|
||||
use std::borrow::Cow;
|
||||
use std::fs;
|
||||
use std::io::{self, Read};
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
use cretonne_codegen::dominator_tree::{DominatorTree, DominatorTreePreorder};
|
||||
use cretonne_codegen::flowgraph::ControlFlowGraph;
|
||||
use cretonne_codegen::ir::Function;
|
||||
use cretonne_codegen::ir::entities::AnyEntity;
|
||||
use cretonne_codegen::ir::Function;
|
||||
use cretonne_reader::TestCommand;
|
||||
use match_directive::match_directive;
|
||||
use std::borrow::{Borrow, Cow};
|
||||
|
||||
@@ -607,7 +607,6 @@ where
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
use Variable;
|
||||
use cretonne_codegen::entity::EntityRef;
|
||||
use cretonne_codegen::ir::types::*;
|
||||
use cretonne_codegen::ir::{AbiParam, ExternalName, Function, InstBuilder, Signature};
|
||||
@@ -615,6 +614,7 @@ mod tests {
|
||||
use cretonne_codegen::settings::CallConv;
|
||||
use cretonne_codegen::verifier::verify_function;
|
||||
use frontend::{FunctionBuilder, FunctionBuilderContext};
|
||||
use Variable;
|
||||
|
||||
fn sample_function(lazy_seal: bool) {
|
||||
let mut sig = Signature::new(CallConv::SystemV);
|
||||
|
||||
@@ -131,9 +131,13 @@
|
||||
#![warn(unused_import_braces)]
|
||||
#![cfg_attr(feature = "std", warn(unstable_features))]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(new_without_default))]
|
||||
#![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))]
|
||||
#![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
|
||||
)
|
||||
)]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![cfg_attr(not(feature = "std"), feature(alloc))]
|
||||
|
||||
|
||||
@@ -712,7 +712,6 @@ where
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use Variable;
|
||||
use cretonne_codegen::cursor::{Cursor, FuncCursor};
|
||||
use cretonne_codegen::entity::EntityRef;
|
||||
use cretonne_codegen::ir::instructions::BranchInfo;
|
||||
@@ -721,6 +720,7 @@ mod tests {
|
||||
use cretonne_codegen::settings;
|
||||
use cretonne_codegen::verify_function;
|
||||
use ssa::SSABuilder;
|
||||
use Variable;
|
||||
|
||||
#[test]
|
||||
fn simple_block() {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
//! Defines the `Backend` trait.
|
||||
|
||||
use cretonne_codegen::isa::TargetIsa;
|
||||
use cretonne_codegen::Context;
|
||||
use cretonne_codegen::{binemit, ir};
|
||||
use std::marker;
|
||||
use DataContext;
|
||||
use Linkage;
|
||||
use ModuleError;
|
||||
use ModuleNamespace;
|
||||
use cretonne_codegen::Context;
|
||||
use cretonne_codegen::isa::TargetIsa;
|
||||
use cretonne_codegen::{binemit, ir};
|
||||
use std::marker;
|
||||
|
||||
/// A `Backend` implements the functionality needed to support a `Module`.
|
||||
pub trait Backend
|
||||
|
||||
@@ -4,9 +4,13 @@
|
||||
#![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, 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))]
|
||||
#![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]
|
||||
extern crate cretonne_codegen;
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
// TODO: Factor out `ir::Function`'s `ext_funcs` and `global_vars` into a struct
|
||||
// shared with `DataContext`?
|
||||
|
||||
use Backend;
|
||||
use cretonne_codegen::entity::{EntityRef, PrimaryMap};
|
||||
use cretonne_codegen::result::CtonError;
|
||||
use cretonne_codegen::{binemit, ir, Context};
|
||||
use data_context::DataContext;
|
||||
use std::collections::HashMap;
|
||||
use Backend;
|
||||
|
||||
/// A function identifier for use in the `Module` interface.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
|
||||
@@ -5,9 +5,13 @@
|
||||
#![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, 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))]
|
||||
#![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
|
||||
)
|
||||
)]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
extern crate cretonne_codegen;
|
||||
|
||||
@@ -7,9 +7,13 @@
|
||||
#![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, 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))]
|
||||
#![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
|
||||
)
|
||||
)]
|
||||
|
||||
extern crate cretonne_codegen;
|
||||
|
||||
|
||||
@@ -2237,9 +2237,9 @@ impl<'a> Parser<'a> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use cretonne_codegen::ir::StackSlotKind;
|
||||
use cretonne_codegen::ir::entities::AnyEntity;
|
||||
use cretonne_codegen::ir::types;
|
||||
use cretonne_codegen::ir::StackSlotKind;
|
||||
use cretonne_codegen::ir::{ArgumentExtension, ArgumentPurpose};
|
||||
use cretonne_codegen::settings::CallConv;
|
||||
use error::Error;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
//! file-based test case.
|
||||
//!
|
||||
|
||||
use cretonne_codegen::ir::Function;
|
||||
use cretonne_codegen::ir::entities::AnyEntity;
|
||||
use cretonne_codegen::ir::Function;
|
||||
use error::Location;
|
||||
use isaspec::IsaSpec;
|
||||
use sourcemap::SourceMap;
|
||||
|
||||
@@ -4,9 +4,13 @@
|
||||
#![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, 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))]
|
||||
#![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
|
||||
)
|
||||
)]
|
||||
|
||||
extern crate cretonne_codegen;
|
||||
extern crate cretonne_module;
|
||||
|
||||
@@ -4,9 +4,13 @@
|
||||
#![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, 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))]
|
||||
#![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
|
||||
)
|
||||
)]
|
||||
|
||||
/// Provide these crates, renamed to reduce stutter.
|
||||
pub extern crate cretonne_codegen as codegen;
|
||||
|
||||
@@ -32,8 +32,8 @@ use state::{ControlStackFrame, TranslationState};
|
||||
use std::collections::{hash_map, HashMap};
|
||||
use std::vec::Vec;
|
||||
use std::{i32, u32};
|
||||
use translation_utils::{f32_translation, f64_translation, num_return_values, type_to_type};
|
||||
use translation_utils::{FunctionIndex, MemoryIndex, SignatureIndex, TableIndex};
|
||||
use translation_utils::{num_return_values, type_to_type, f32_translation, f64_translation};
|
||||
use wasmparser::{MemoryImmediate, Operator};
|
||||
|
||||
// Clippy warns about "flags: _" but its important to document that the flags field is ignored
|
||||
|
||||
@@ -14,9 +14,13 @@
|
||||
#![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 = "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))]
|
||||
#![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
|
||||
)
|
||||
)]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![cfg_attr(not(feature = "std"), feature(alloc))]
|
||||
|
||||
@@ -57,7 +61,7 @@ mod std {
|
||||
pub use alloc::vec;
|
||||
pub use core::fmt;
|
||||
pub use core::option;
|
||||
pub use core::{cmp, str, i32, u32};
|
||||
pub use core::{cmp, i32, str, u32};
|
||||
pub mod collections {
|
||||
pub use hashmap_core::{map as hash_map, HashMap};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user