Stream: git-wasmtime

Topic: wasmtime / PR #12519 Define a `TryClone` trait for clonin...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 16:29):

fitzgen requested cfallin for a review on PR #12519.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 16:29):

fitzgen opened PR #12519 from fitzgen:try-clone to bytecodealliance:main:

Part of https://github.com/bytecodealliance/wasmtime/issues/12069

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 16:29):

fitzgen requested wasmtime-core-reviewers for a review on PR #12519.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 18:08):

fitzgen updated PR #12519.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 18:11):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 18:11):

alexcrichton created PR review comment:

Could this perhaps be impl<T: Copy> TryClone for T?

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 18:24):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 18:24):

fitzgen created PR review comment:

FWIW, we would still need these implementations for tuples even with that blanket impl, so that something like (Box<usize>, Vec<u8>), which is not Copy, could still implement TryClone.

I did try to implement TryClone for all T: Copy and ran into conflicting trait impls. I guess because (T0, T1) might be Copy and Rust doesn't know whether to use the blanket Copy impl or the where T0: TryClone, T1: TryClone impl?

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 18:24):

fitzgen added PR #12519 Define a TryClone trait for cloning with fallible allocation to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 18:24):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 18:24):

fitzgen created PR review comment:

(Enqueuing to merge now, if you know of a way to resolve this issue, we can do it in a follow up.)

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 18:48):

fitzgen merged PR #12519.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 18:48):

fitzgen removed PR #12519 Define a TryClone trait for cloning with fallible allocation from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 19:31):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 19:31):

alexcrichton created PR review comment:

Ah yeah I thought coherence wouldn't trip up here but it's definitely tripping up, so definitely not possible


Last updated: Feb 24 2026 at 04:36 UTC