Skip to content

std: Option and Result are Clone when their payloads are (#2161) - #2164

Merged
ehartford merged 1 commit into
seed-bump-3207aacfrom
std-clone-option-result
Oct 5, 2026
Merged

ehartford merged 1 commit into
seed-bump-3207aacfrom
std-clone-option-result

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Two impls in lib/std, plain With: impl[T: Clone] Clone for Option[T] and impl[T: Clone, E: Clone] Clone for Result[T, E]. Test under the debug allocator: da_2161_option_result_clone (the clone owns its own payload; both dropped once; leak count 0). The tuple and array half of #2161 needs a spec sentence.

@ehartford
ehartford force-pushed the std-clone-option-result branch from 39f6529 to eed048a Compare October 5, 2026 12:23
@ehartford
ehartford changed the base branch from main to seed-bump-3207aac October 5, 2026 12:23
@ehartford
ehartford added this pull request to stack #2167 October 5, 2026 12:23
@ehartford

Copy link
Copy Markdown
Contributor Author

Battery GREEN on the stack top cef3897, driven by the pinned seed (gate 759 s, uat 30 s, battery-checks 1361 s); green recorded with :last-green.

@ehartford
ehartford marked this pull request as ready for review October 5, 2026 12:23
@ehartford
ehartford merged commit a57d2d2 into main Oct 5, 2026
@ehartford
ehartford deleted the std-clone-option-result branch October 5, 2026 12:23
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.

1 participant