Repository navigation
API Docs: ptr #29371
Description
Activity
- addedE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
on Mar 8, 2017 I am happy to mentor anyone who wants to tackle this issue.
- addedA-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and tools
on Mar 10, 2017 - addedP-mediumMedium priorityMedium priorityE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.and removed
on Mar 24, 2017 @steveklabnik I'd like to help tackle this by taking on some of the items. Any general suggestions before I get started?
I also have one question: any preference as to what website to use for linking to C standard library functions? How does this look for
memmove?I'd like to help tackle this by taking on some of the items. Any general suggestions before I get started?
Wonderful! I left a bunch of related-ish comments on https://www.reddit.com/r/rust/comments/61avqf/want_to_join_the_rust_docs_team/?st=j0s6zfg8&sh=79419433. Of course, this whole exercise has brought up a meta issue, which is that our "how to contribute to docs" docs aren't as awesome as they could be. I'm gonna try to work on that 😄
I also have one question: any preference as to what website to use for linking to C standard library functions?
This is a good question. I am not sure.
How does this look for memmove?
I haven't heard of this website before and I'm slightly skpetical of a wiki. I asked on Twitter, and got a number of responses:
- https://msdn.microsoft.com/en-us/library/8k35d1fx.aspx
- http://man7.org/
- http://pubs.opengroup.org/onlinepubs/009695399/functions/memmove.html
- https://manpages.debian.org/jessie/manpages-dev/memmove.3.en.html
- https://www.freebsd.org/cgi/man.cgi?memmove
I think I'm leaning towards MSDN here.
3 remaining items
@lukaramu @hinaria: Want me to assign it to both of you "officially"?
Hi all, sorry for my absence.
I still like to do
copyandcopy_nonoverlappingat the very least, but @lukaramu and @hinaria feel free to split the rest.@GuillaumeGomez I'll tackle other modules first since there are people working on this one, thanks for asking though!
I'm folding #36450 into this issue; basically, make sure that each function also mentions its requirements w.r.t. alignment. (Generally speaking, unless it says
_unaligned, it needs the pointer to have the same alignment as the type.)No worries! Glad you're feeling better!
Reacted by markNewbie here,
If no one's currently working on this, I'd like to pick it up.
I've added the requisite information to
copyandcopy_nonoverlapping. I'm using the GNU libc docs for links tomemcpyandmemmove.A few questions:
- Does
write_bytesrequire its argument to be properly aligned? - Should I discuss undefined behavior under the "Undefined Behavior" heading described in RFC 1574, or keep it under "Safety"? Most documentation for
stdseems to use "Safety". - Is there good documentation for how to submit PRs for the docs somewhere? Do I just add "at steveklabnik" to the PR?
Thanks!
- Does
@ecstatic-morse that'd be great!
- I'm not actually sure!
- The "Undefined Behavior" convention is a newer one, and so not all of std is up to date with it. So yeah, go ahead and use it even though it's not heavily used yet. :)
- You don't even need to do that; the bots will assign someone. You can also put "r? @steveklabnik" to force the bot to assign it to me, but I'll probably get assigned anyway
- added a commit that references this issue
on May 14, 2018 - added a commit that references this issue
on May 15, 2018 I'll reopen this issue because it doesn't feel like it's actually fixed.
Triage: I have looked at all of the individual checkboxes, and 99% of the work here is done. I think these massive tracking issues have served their purpose; if you'd like to see more improvements to the
ptrdocs, please open one, focused issue for each improvement, and we can tackle them!
Part of #29329
http://doc.rust-lang.org/std/ptr/
Here's what needs to be done to close out this issue:
*const T/*mut T, but it's really about common functions that work with them.copycould link tomemmovesomewhere.copy_nonoverlappingshould link tomemcpy. Both of these functions should talk more about what "overlapping" means here.drop_in_placeneeds links and examplesreadneeds to explain why and where you should use it, as well as linking some stuff.read_volitileneeds linksreplaceshould link tomem::replace, and justify its unsafety better.swapneeds to split out its summary from its description, link tomem::swap, and get an example.writeneeds to explain when and where to use it, and to link some typeswrite_bytesneeds to better justify itself, linkmemset, and move that out of its summary line.write_volatileneeds to linkread.