Update to Rust 2018 edition (#632)

* initial cargo fix run

* Upgrade cranelift-entity crate

* Upgrade bforest crate

* Upgrade the codegen crate

* Upgrade the faerie crate

* Upgrade the filetests crate

* Upgrade the codegen-meta crate

* Upgrade the frontend crate

* Upgrade the cranelift-module crate

* Upgrade the cranelift-native crate

* Upgrade the cranelift-preopt crate

* Upgrade the cranelift-reader crate

* Upgrade the cranelift-serde crate

* Upgrade the cranelift-simplejit crate

* Upgrade the cranelift or cranelift-umbrella crate

* Upgrade the cranelift-wasm crate

* Upgrade cranelift-tools crate

* Use new import style on remaining files

* run format-all.sh

* run test-all.sh, update Readme and travis ci configuration
fixed an AssertionError also

* Remove deprecated functions
This commit is contained in:
Muhammad Mominul Huque
2018-12-26 23:49:05 +06:00
committed by Dan Gohman
parent e3db942b0c
commit effe6c04e4
217 changed files with 963 additions and 1021 deletions

View File

@@ -8,6 +8,7 @@ documentation = "https://cranelift.readthedocs.io/"
categories = ["no-std"]
license = "Apache-2.0 WITH LLVM-exception"
readme = "README.md"
edition = "2018"
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.26.0", default-features = false }

View File

@@ -1,7 +1,3 @@
extern crate cranelift;
extern crate cranelift_module;
extern crate cranelift_simplejit;
use cranelift::prelude::*;
use cranelift_module::{Linkage, Module};
use cranelift_simplejit::{SimpleJITBackend, SimpleJITBuilder};

View File

@@ -1,5 +1,6 @@
//! Defines `SimpleJITBackend`.
use crate::memory::Memory;
use cranelift_codegen::binemit::{Addend, CodeOffset, NullTrapSink, Reloc, RelocSink};
use cranelift_codegen::isa::TargetIsa;
use cranelift_codegen::{self, ir, settings};
@@ -8,7 +9,6 @@ use cranelift_module::{
};
use cranelift_native;
use libc;
use memory::Memory;
use std::collections::HashMap;
use std::ffi::CString;
use std::io::Write;

View File

@@ -26,18 +26,7 @@
)
)]
extern crate cranelift_codegen;
extern crate cranelift_module;
extern crate cranelift_native;
extern crate errno;
extern crate libc;
extern crate region;
extern crate target_lexicon;
#[cfg(target_os = "windows")]
extern crate winapi;
mod backend;
mod memory;
pub use backend::{SimpleJITBackend, SimpleJITBuilder};
pub use crate::backend::{SimpleJITBackend, SimpleJITBuilder};

View File

@@ -1,9 +1,3 @@
extern crate cranelift_codegen;
extern crate cranelift_entity;
extern crate cranelift_frontend;
extern crate cranelift_module;
extern crate cranelift_simplejit;
use cranelift_codegen::ir::*;
use cranelift_codegen::isa::CallConv;
use cranelift_codegen::Context;