-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Clone::clone_from for Option and Result #61348
Conversation
r? @KodrAus (rust_highfive has picked a reviewer for you, use r? to override) |
These are still fully-structural |
There's been a few discussions on this. #27939 was closed because it would affect the compile times too much. Also, I think it might go wrong when there are multiple fields: If some fields are succesfully clone_from'd, but another panics, the object might be left in an invalid state. But it should be possible if there's only one field. |
@bors try |
Implement Clone::clone_from for Option and Result See #28481
☀️ Try build successful - checks-travis |
@rust-timer build 1406f73 |
Success: Queued 1406f73 with parent 400b409, comparison URL. |
Finished benchmarking try commit 1406f73, comparison URL. |
Looks like noise. |
📌 Commit 67fd995 has been approved by |
…odrAus Implement Clone::clone_from for Option and Result See rust-lang#28481
Rollup of 9 pull requests Successful merges: - #60187 (Generator optimization: Overlap locals that never have storage live at the same time) - #61348 (Implement Clone::clone_from for Option and Result) - #61568 (Use Symbol, Span in libfmt_macros) - #61632 (ci: Collect CPU usage statistics on Azure) - #61654 (use pattern matching for slices destructuring) - #61671 (implement nth_back for Range(Inclusive)) - #61688 (is_fp and is_floating_point do the same thing, remove the former) - #61705 (Pass cflags rather than cxxflags to LLVM as CMAKE_C_FLAGS) - #61734 (Migrate rust-by-example to MdBook2) Failed merges: r? @ghost
See #28481