-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
Rewrite docs for pointer methods #53783
Commits on Aug 29, 2018
-
- Add links to the GNU libc docs for `memmove`, `memcpy`, and `memset`, as well as internally linking to other functions in `std::ptr` - List invariants which, when violated, cause UB for all functions - Add example to `ptr::drop_in_place` and compares it to `ptr::read`. - Add examples which more closely mirror real world uses for the functions in `std::ptr`. Also, move the reimplementation of `mem::swap` to the examples of `ptr::read` and use a more interesting example for `copy_nonoverlapping`. - Change module level description - Define what constitutes a "valid" pointer. - Centralize discussion of ownership of bitwise copies in `ptr::read` and provide an example.
Configuration menu - View commit details
-
Copy full SHA for 911d35f - Browse repository at this point
Copy the full SHA 911d35fView commit details -
Mention alignment in top-level docs
This also removes the overlong link that failed tidy xD.
Configuration menu - View commit details
-
Copy full SHA for da58beb - Browse repository at this point
Copy the full SHA da58bebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f5a3cc - Browse repository at this point
Copy the full SHA 9f5a3ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 04a08c6 - Browse repository at this point
Copy the full SHA 04a08c6View commit details -
Update docs for
swap_nonoverlapping
They closely mirror the docs for `copy_nonoverlapping`
Configuration menu - View commit details
-
Copy full SHA for 7b2ef6b - Browse repository at this point
Copy the full SHA 7b2ef6bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f7338b - Browse repository at this point
Copy the full SHA 6f7338bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 30122e9 - Browse repository at this point
Copy the full SHA 30122e9View commit details -
Remove definiton of valid pointer
The enumerated list of conditions is replaced by an explanation that rust doesn't have a formal memory model. It does say that pointers created directly from references are guaranteed to be valid, and links to both the "Unsafe Code" section of the book and the "Undefined Behavior" section of the reference.
Configuration menu - View commit details
-
Copy full SHA for e40585f - Browse repository at this point
Copy the full SHA e40585fView commit details -
Uses `x.offset(i)` must be valid for all `i` in `0..count`.
Configuration menu - View commit details
-
Copy full SHA for ea5570c - Browse repository at this point
Copy the full SHA ea5570cView commit details -
Incorporate RalfJung's suggestions
This splits "valid" into "valid for reads" and "valid for writes", and also adds the concept of operation size to validity. Now functions which operate on sequences state that e.g. pointer args must be "valid for reads of size x".
Configuration menu - View commit details
-
Copy full SHA for 3a55c85 - Browse repository at this point
Copy the full SHA 3a55c85View commit details -
Configuration menu - View commit details
-
Copy full SHA for 95a9088 - Browse repository at this point
Copy the full SHA 95a9088View commit details -
Add a list of known facts re: validity
Also rewrites the reads/writes section to be less reliant on `*const`, `*mut`
Configuration menu - View commit details
-
Copy full SHA for 7e165d9 - Browse repository at this point
Copy the full SHA 7e165d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c8da321 - Browse repository at this point
Copy the full SHA c8da321View commit details -
Configuration menu - View commit details
-
Copy full SHA for b0c5dc2 - Browse repository at this point
Copy the full SHA b0c5dc2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 098bec8 - Browse repository at this point
Copy the full SHA 098bec8View commit details
Commits on Aug 30, 2018
-
Configuration menu - View commit details
-
Copy full SHA for fc63113 - Browse repository at this point
Copy the full SHA fc63113View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ec66fb - Browse repository at this point
Copy the full SHA 1ec66fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for e869b81 - Browse repository at this point
Copy the full SHA e869b81View commit details -
Configuration menu - View commit details
-
Copy full SHA for d97f61f - Browse repository at this point
Copy the full SHA d97f61fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c06f551 - Browse repository at this point
Copy the full SHA c06f551View commit details -
1
Configuration menu - View commit details
-
Copy full SHA for 2741224 - Browse repository at this point
Copy the full SHA 2741224View commit details -
Configuration menu - View commit details
-
Copy full SHA for 18a7bdb - Browse repository at this point
Copy the full SHA 18a7bdbView commit details
Commits on Aug 31, 2018
-
turn ptr type method docs into links to docs of free functions, to av…
…oid duplication and inconsistency
Configuration menu - View commit details
-
Copy full SHA for 4ed469c - Browse repository at this point
Copy the full SHA 4ed469cView commit details -
Configuration menu - View commit details
-
Copy full SHA for dc2237c - Browse repository at this point
Copy the full SHA dc2237cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b463871 - Browse repository at this point
Copy the full SHA b463871View commit details -
Configuration menu - View commit details
-
Copy full SHA for 408a6a0 - Browse repository at this point
Copy the full SHA 408a6a0View commit details
Commits on Sep 1, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 755de3c - Browse repository at this point
Copy the full SHA 755de3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for bc809e0 - Browse repository at this point
Copy the full SHA bc809e0View commit details
Commits on Sep 11, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 78f5b68 - Browse repository at this point
Copy the full SHA 78f5b68View commit details -
Configuration menu - View commit details
-
Copy full SHA for c44e88c - Browse repository at this point
Copy the full SHA c44e88cView commit details
Commits on Sep 17, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 2713d36 - Browse repository at this point
Copy the full SHA 2713d36View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ec87d0 - Browse repository at this point
Copy the full SHA 0ec87d0View commit details
Commits on Sep 18, 2018
-
Configuration menu - View commit details
-
Copy full SHA for adcc0d2 - Browse repository at this point
Copy the full SHA adcc0d2View commit details
Commits on Sep 21, 2018
-
Configuration menu - View commit details
-
Copy full SHA for c197dc4 - Browse repository at this point
Copy the full SHA c197dc4View commit details