Update to Rust 2018 Edition.

This commit is contained in:
Dan Gohman
2019-01-03 12:58:11 -08:00
parent 00a84672f7
commit f6c2fe7d2d
37 changed files with 134 additions and 162 deletions

View File

@@ -22,21 +22,12 @@
)
)]
extern crate cranelift_codegen;
extern crate cranelift_entity;
extern crate cranelift_wasm;
extern crate failure;
use failure;
#[macro_use]
extern crate failure_derive;
extern crate target_lexicon;
extern crate wabt;
extern crate wasmparser;
extern crate wasmtime_environ;
extern crate wasmtime_jit;
extern crate wasmtime_runtime;
mod spectest;
mod wast;
pub use spectest::instantiate_spectest;
pub use wast::{WastContext, WastError};
pub use crate::spectest::instantiate_spectest;
pub use crate::wast::{WastContext, WastError};

View File

@@ -1,4 +1,4 @@
use spectest::instantiate_spectest;
use crate::spectest::instantiate_spectest;
use std::io::Read;
use std::path::Path;
use std::{fmt, fs, io, str};
@@ -26,7 +26,7 @@ pub struct UnknownInstance {
}
impl fmt::Display for UnknownInstance {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.instance {
None => write!(f, "no default instance present"),
Some(ref name) => write!(f, "no instance {} present", name),
@@ -52,7 +52,7 @@ pub enum WastError {
}
impl fmt::Display for WastError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {
WastError::Assert(ref message) => write!(f, "Assert command failed: {}", message),
WastError::Instance(ref error) => error.fmt(f),