Skip to content

API Docs: ptr #29371

Description

@steveklabnik

Part of #29329

http://doc.rust-lang.org/std/ptr/

Here's what needs to be done to close out this issue:

  • the module docs act like this is about *const T/*mut T, but it's really about common functions that work with them.
  • copy could link to memmove somewhere.
  • copy_nonoverlapping should link to memcpy. Both of these functions should talk more about what "overlapping" means here.
  • drop_in_place needs links and examples
  • read needs to explain why and where you should use it, as well as linking some stuff.
  • read_volitile needs links
  • replace should link to mem::replace, and justify its unsafety better.
  • swap needs to split out its summary from its description, link to mem::swap, and get an example.
  • write needs to explain when and where to use it, and to link some types
  • write_bytes needs to better justify itself, link memset, and move that out of its summary line.
  • write_volatile needs to link read.

Activity

  1. added a commit that references this issue on Apr 17, 2016
  2. added 2 commits that reference this issue on Sep 2, 2016
  3. added
    E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
    on Mar 8, 2017
  4. steveklabnik commented on Mar 8, 2017

    @steveklabnik
    ContributorAuthor

    I am happy to mentor anyone who wants to tackle this issue.

  5. added
    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
    on Mar 10, 2017
  6. added
    E-help-wantedCall for participation: Help is requested to fix this issue.
    E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.
    and removed on Mar 24, 2017
  7. bandali commented on Mar 25, 2017

    @bandali

    @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?

  8. steveklabnik commented on Mar 27, 2017

    @steveklabnik
    ContributorAuthor

    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:

    I think I'm leaning towards MSDN here.

  9. 3 remaining items

  10. chordowl commented on Aug 9, 2017

    @chordowl
    Contributor

    Hey there @hinaria and @aminb! I'm currently going over the remaining API tracking issues and saw your comments here. Are you still interested in helping out with this?

  11. GuillaumeGomez commented on Aug 10, 2017

    @GuillaumeGomez
    Member

    @lukaramu @hinaria: Want me to assign it to both of you "officially"?

  12. bandali commented on Aug 10, 2017

    @bandali

    Hi all, sorry for my absence.

    I still like to do copy and copy_nonoverlapping at the very least, but @lukaramu and @hinaria feel free to split the rest.

  13. chordowl commented on Aug 11, 2017

    @chordowl
    Contributor

    @GuillaumeGomez I'll tackle other modules first since there are people working on this one, thanks for asking though!

  14. QuietMisdreavus commented on Sep 13, 2017

    @QuietMisdreavus
    Contributor

    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.)

  15. QuietMisdreavus commented on Nov 6, 2017

    @QuietMisdreavus
    Contributor

    No worries! Glad you're feeling better!

  16. ecstatic-morse commented on Apr 6, 2018

    @ecstatic-morse
    Contributor

    Newbie here,

    If no one's currently working on this, I'd like to pick it up.

    I've added the requisite information to copy and copy_nonoverlapping. I'm using the GNU libc docs for links to memcpy and memmove.

    A few questions:

    • Does write_bytes require 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 std seems 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!

  17. steveklabnik commented on Apr 6, 2018

    @steveklabnik
    ContributorAuthor

    @ecstatic-morse that'd be great!

    1. I'm not actually sure!
    2. 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. :)
    3. 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
  18. added a commit that references this issue on May 14, 2018
    97e82a3
  19. added a commit that references this issue on May 15, 2018
    7a9eb83
  20. GuillaumeGomez commented on May 15, 2018

    @GuillaumeGomez
    Member

    I'll reopen this issue because it doesn't feel like it's actually fixed.

  21. steveklabnik commented on Jan 8, 2019

    @steveklabnik
    ContributorAuthor

    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 ptr docs, please open one, focused issue for each improvement, and we can tackle them!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCE-help-wantedCall for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.P-mediumMedium priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions