From 6623f802de7fc6fe5c6246c05ddc1f26c116d0fd Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 19 Nov 2024 15:03:26 -0800 Subject: [PATCH] Get tests compiling again --- crates/wasmtime/src/runtime/component/component.rs | 1 - crates/wasmtime/src/runtime/func.rs | 2 +- crates/wasmtime/src/runtime/trampoline/func.rs | 5 +---- crates/wasmtime/src/runtime/vm.rs | 1 - crates/wasmtime/src/runtime/vm/interpreter.rs | 2 -- .../src/runtime/vm/vmcontext/vm_host_func_context.rs | 1 - tests/disas.rs | 3 ++- 7 files changed, 4 insertions(+), 11 deletions(-) diff --git a/crates/wasmtime/src/runtime/component/component.rs b/crates/wasmtime/src/runtime/component/component.rs index c54c32d2a268..c32f319bdfb4 100644 --- a/crates/wasmtime/src/runtime/component/component.rs +++ b/crates/wasmtime/src/runtime/component/component.rs @@ -15,7 +15,6 @@ use crate::{ use crate::{FuncType, ValType}; use alloc::sync::Arc; use core::any::Any; -use core::mem; use core::ops::Range; use core::ptr::NonNull; #[cfg(feature = "std")] diff --git a/crates/wasmtime/src/runtime/func.rs b/crates/wasmtime/src/runtime/func.rs index 80d6dc3cbb6b..4e21bfaf1ab0 100644 --- a/crates/wasmtime/src/runtime/func.rs +++ b/crates/wasmtime/src/runtime/func.rs @@ -16,7 +16,7 @@ use core::future::Future; use core::mem::{self, MaybeUninit}; use core::num::NonZeroUsize; use core::pin::Pin; -use core::ptr::{self, NonNull}; +use core::ptr::NonNull; use wasmtime_environ::VMSharedTypeIndex; /// A reference to the abstract `nofunc` heap value. diff --git a/crates/wasmtime/src/runtime/trampoline/func.rs b/crates/wasmtime/src/runtime/trampoline/func.rs index 997d3feb52d3..e484dd9f0e99 100644 --- a/crates/wasmtime/src/runtime/trampoline/func.rs +++ b/crates/wasmtime/src/runtime/trampoline/func.rs @@ -1,12 +1,9 @@ //! Support for a calling of an imported function. use crate::prelude::*; -use crate::runtime::vm::{ - StoreBox, VMArrayCallHostFuncContext, VMContext, VMFuncRef, VMOpaqueContext, -}; +use crate::runtime::vm::{StoreBox, VMArrayCallHostFuncContext, VMContext, VMOpaqueContext}; use crate::type_registry::RegisteredType; use crate::{FuncType, ValRaw}; -use core::ptr; struct TrampolineState { func: F, diff --git a/crates/wasmtime/src/runtime/vm.rs b/crates/wasmtime/src/runtime/vm.rs index ad6a727538ee..fc04d23934d7 100644 --- a/crates/wasmtime/src/runtime/vm.rs +++ b/crates/wasmtime/src/runtime/vm.rs @@ -9,7 +9,6 @@ use crate::prelude::*; use crate::store::StoreOpaque; use alloc::sync::Arc; use core::fmt; -use core::mem; use core::ops::Deref; use core::ops::DerefMut; use core::ptr::NonNull; diff --git a/crates/wasmtime/src/runtime/vm/interpreter.rs b/crates/wasmtime/src/runtime/vm/interpreter.rs index a2020b6752c5..0e1edf05d264 100644 --- a/crates/wasmtime/src/runtime/vm/interpreter.rs +++ b/crates/wasmtime/src/runtime/vm/interpreter.rs @@ -1,8 +1,6 @@ use crate::prelude::*; use crate::runtime::vm::VMOpaqueContext; use crate::ValRaw; -use core::marker; -use core::mem; use core::ptr::NonNull; use pulley_interpreter::interp::{Vm, XRegVal}; diff --git a/crates/wasmtime/src/runtime/vm/vmcontext/vm_host_func_context.rs b/crates/wasmtime/src/runtime/vm/vmcontext/vm_host_func_context.rs index bae15f9b2c28..3976be30bb92 100644 --- a/crates/wasmtime/src/runtime/vm/vmcontext/vm_host_func_context.rs +++ b/crates/wasmtime/src/runtime/vm/vmcontext/vm_host_func_context.rs @@ -5,7 +5,6 @@ use super::{VMArrayCallNative, VMOpaqueContext}; use crate::prelude::*; use crate::runtime::vm::{StoreBox, VMFuncRef}; -use crate::ValRaw; use core::any::Any; use core::ptr::{self, NonNull}; use wasmtime_environ::{VMSharedTypeIndex, VM_ARRAY_CALL_HOST_FUNC_MAGIC}; diff --git a/tests/disas.rs b/tests/disas.rs index 4494ac6e7188..74baea36221d 100644 --- a/tests/disas.rs +++ b/tests/disas.rs @@ -174,7 +174,8 @@ impl Test { // Use wasmtime::Config with its `emit_clif` option to get Wasmtime's // code generator to jettison CLIF out the back. let tempdir = TempDir::new().context("failed to make a tempdir")?; - let mut config = self.opts.config(Some(&self.config.target), None)?; + let mut config = self.opts.config(None)?; + config.target(&self.config.target)?; match self.config.test { TestKind::Clif | TestKind::Optimize => { config.emit_clif(tempdir.path());