-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Clarify transmute_copy documentation example #66477
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Kimundi (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
📌 Commit 3407c49 has been approved by |
…=Centril Clarify transmute_copy documentation example Currently the documentation for `transmute_copy` implies that the function accepts a slice due to the variable name chosen in the example. This is misleading as `foo_slice` is actually an array and `transmute_copy` cannot take an unsized type anyway. This PR just clarifies things by renaming the variable used in the example.
…=Centril Clarify transmute_copy documentation example Currently the documentation for `transmute_copy` implies that the function accepts a slice due to the variable name chosen in the example. This is misleading as `foo_slice` is actually an array and `transmute_copy` cannot take an unsized type anyway. This PR just clarifies things by renaming the variable used in the example.
Rollup of 11 pull requests Successful merges: - #65739 (Improve documentation of `Vec::split_off(...)`) - #66271 (syntax: Keep string literals in ABIs and `asm!` more precisely) - #66344 (rustc_plugin: Remove `Registry::register_attribute`) - #66381 (find_deprecation: deprecation attr may be ill-formed meta.) - #66395 (Centralize panic macro documentation) - #66456 (Move `DIAGNOSTICS` usage to `rustc_driver`) - #66465 (add missing 'static lifetime in docs) - #66466 (miri panic_unwind: fix hack for SEH platforms) - #66469 (Use "field is never read" instead of "field is never used") - #66471 (Add test for issue 63116) - #66477 (Clarify transmute_copy documentation example) Failed merges: r? @ghost
Currently the documentation for
transmute_copy
implies that the function accepts a slice due to the variable name chosen in the example. This is misleading asfoo_slice
is actually an array andtransmute_copy
cannot take an unsized type anyway.This PR just clarifies things by renaming the variable used in the example.