Skip to content

Expand CloneToUninit documentation.#133055

Merged
bors merged 3 commits intorust-lang:masterfrom
kpreid:clone-uninit-doc
Mar 16, 2025
Merged

Expand CloneToUninit documentation.#133055
bors merged 3 commits intorust-lang:masterfrom
kpreid:clone-uninit-doc

Conversation

@kpreid
Copy link
Copy Markdown
Contributor

@kpreid kpreid commented Nov 14, 2024

  • Clarify relationship to dyn after Make CloneToUninit dyn-compatible #133003.
  • Add an example of using it with dyn as Make CloneToUninit dyn-compatible #133003 enabled.
  • Replace parameter name dst with dest to avoid confusion between abbreviations for “DeSTination” and “Dynamically-Sized Type”.
  • Add an example of implementing it.
  • Add links to Rust Reference for the mentioned concepts.
  • Mention that its method should rarely be called.
  • Various small corrections.

Please review the unsafe code closely, as I am not an expert in the best possible ways to express these operations. (It might also be better to omit the implementation example entirely.)

cc @zachs18 #126799

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants