diff --git a/.github/actions/install-rust/action.yml b/.github/actions/install-rust/action.yml index 2a350f248c..c5f40462ac 100644 --- a/.github/actions/install-rust/action.yml +++ b/.github/actions/install-rust/action.yml @@ -23,7 +23,7 @@ runs: elif [ "${{ inputs.toolchain }}" = "msrv" ]; then echo "version=1.$msrv.0" >> "$GITHUB_OUTPUT" elif [ "${{ inputs.toolchain }}" = "wasmtime-ci-pinned-nightly" ]; then - echo "version=nightly-2024-07-25" >> "$GITHUB_OUTPUT" + echo "version=nightly-2024-08-12" >> "$GITHUB_OUTPUT" else echo "version=${{ inputs.toolchain }}" >> "$GITHUB_OUTPUT" fi diff --git a/crates/wasmtime/src/runtime/store.rs b/crates/wasmtime/src/runtime/store.rs index e3e9f0f72c..e3dbe894c7 100644 --- a/crates/wasmtime/src/runtime/store.rs +++ b/crates/wasmtime/src/runtime/store.rs @@ -1178,13 +1178,14 @@ impl StoreInner { // Temporarily take the configured behavior to avoid mutably borrowing // multiple times. + #[cfg_attr(not(feature = "call-hook"), allow(unreachable_patterns))] if let Some(mut call_hook) = self.call_hook.take() { let result = self.invoke_call_hook(&mut call_hook, s); self.call_hook = Some(call_hook); - result - } else { - Ok(()) + return result; } + + Ok(()) } fn invoke_call_hook(&mut self, call_hook: &mut CallHookInner, s: CallHook) -> Result<()> { diff --git a/crates/wasmtime/src/runtime/values.rs b/crates/wasmtime/src/runtime/values.rs index 44244d2687..9d1c3bd3e5 100644 --- a/crates/wasmtime/src/runtime/values.rs +++ b/crates/wasmtime/src/runtime/values.rs @@ -854,9 +854,10 @@ impl Ref { (Ref::Any(_), HeapType::Any) => true, (Ref::Any(Some(a)), HeapType::I31) => a._is_i31(store)?, (Ref::Any(Some(a)), HeapType::Struct) => a._is_struct(store)?, - (Ref::Any(Some(a)), HeapType::ConcreteStruct(ty)) => match a._as_struct(store)? { + (Ref::Any(Some(a)), HeapType::ConcreteStruct(_ty)) => match a._as_struct(store)? { None => false, - Some(s) => s._matches_ty(store, ty)?, + #[cfg_attr(not(feature = "gc"), allow(unreachable_patterns))] + Some(s) => s._matches_ty(store, _ty)?, }, (Ref::Any(Some(_)), HeapType::Eq) => todo!("eqref"), (Ref::Any(Some(_)), HeapType::Array) => todo!("wasm GC arrays"), diff --git a/crates/wasmtime/src/runtime/vm/cow.rs b/crates/wasmtime/src/runtime/vm/cow.rs index 5a458d7fc5..ded449f8e3 100644 --- a/crates/wasmtime/src/runtime/vm/cow.rs +++ b/crates/wasmtime/src/runtime/vm/cow.rs @@ -1,6 +1,10 @@ //! Copy-on-write initialization support: creation of backing images for //! modules, and logic to support mapping these backing images into memory. +// `MemoryImageSource` is an empty enum on some platforms which triggers some +// warnings +#![cfg_attr(any(not(unix), miri), allow(unreachable_patterns))] + use crate::prelude::*; use crate::runtime::vm::sys::vm::{self, MemoryImageSource}; use crate::runtime::vm::{MmapVec, SendSyncPtr}; diff --git a/crates/wasmtime/src/runtime/vm/gc.rs b/crates/wasmtime/src/runtime/vm/gc.rs index eee0509dee..e3d85f6467 100644 --- a/crates/wasmtime/src/runtime/vm/gc.rs +++ b/crates/wasmtime/src/runtime/vm/gc.rs @@ -149,6 +149,7 @@ impl GcStore { ) -> Result>> { let host_data_id = self.host_data_table.alloc(value); match self.gc_heap.alloc_externref(host_data_id)? { + #[cfg_attr(not(feature = "gc"), allow(unreachable_patterns))] Some(x) => Ok(Ok(x)), None => Ok(Err(self.host_data_table.dealloc(host_data_id))), }