Skip to content

Don't be clever about representing non-CoW images#4691

Merged
jameysharp merged 1 commit intobytecodealliance:mainfrom
alexcrichton:fix-build
Aug 11, 2022
Merged

Don't be clever about representing non-CoW images#4691
jameysharp merged 1 commit intobytecodealliance:mainfrom
alexcrichton:fix-build

Conversation

@alexcrichton
Copy link
Member

This commit fixes a build warning on Rust 1.63 when the memory-init-cow
feature is disabled in the wasmtime-runtime crate. Some "tricks" were
used prior to have the MemoryImage type be an empty enum {} but that
wreaks havoc with warnings so this commit instead just makes it a unit
struct and makes all methods panic (as they shouldn't be hit anyway).

This commit fixes a build warning on Rust 1.63 when the `memory-init-cow`
feature is disabled in the `wasmtime-runtime` crate. Some "tricks" were
used prior to have the `MemoryImage` type be an empty `enum {}` but that
wreaks havoc with warnings so this commit instead just makes it a unit
struct and makes all methods panic (as they shouldn't be hit anyway).
@jameysharp jameysharp enabled auto-merge (squash) August 11, 2022 17:55
@jameysharp jameysharp merged commit c1c48b4 into bytecodealliance:main Aug 11, 2022
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request Aug 11, 2022
)

This commit fixes a build warning on Rust 1.63 when the `memory-init-cow`
feature is disabled in the `wasmtime-runtime` crate. Some "tricks" were
used prior to have the `MemoryImage` type be an empty `enum {}` but that
wreaks havoc with warnings so this commit instead just makes it a unit
struct and makes all methods panic (as they shouldn't be hit anyway).
alexcrichton added a commit that referenced this pull request Aug 11, 2022
This commit fixes a build warning on Rust 1.63 when the `memory-init-cow`
feature is disabled in the `wasmtime-runtime` crate. Some "tricks" were
used prior to have the `MemoryImage` type be an empty `enum {}` but that
wreaks havoc with warnings so this commit instead just makes it a unit
struct and makes all methods panic (as they shouldn't be hit anyway).
@alexcrichton alexcrichton deleted the fix-build branch February 21, 2023 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants