-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Add doc for va_list APIs #146925
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
base: master
Are you sure you want to change the base?
Add doc for va_list APIs #146925
Conversation
f151fb8
to
9c6f170
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small nits and please squash, then r=me. Thanks for the fixes!
library/core/src/intrinsics/mod.rs
Outdated
/// You must check the following invariants before you call this function: | ||
/// | ||
/// - `ap` must not be used to access variable arguments after this call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be simplified to just:
/// `ap` must not be used to access variable arguments after this call
library/core/src/ffi/va_list.rs
Outdated
/// | ||
/// - has a type that is ABI-compatible with the type `T` | ||
/// - has a value that is a properly initialized value of type `T` | ||
/// - there is a next variable argument available (i.e., the number of arguments already read from `ap` is less than the total number passed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rewrap to 100 chars (same in intrinsics/mod.rs
)
Done! r? @tgross35 |
Requested reviewer is already assigned to this pull request. Please choose another assignee. |
I observed that PR146521 submitted two weeks ago resolved some documentation issues related to
VaListImpl
, similar to the previous PR136969.This PR specifically adds requirements about argument availability for
VaListImpl::arg
, and also adds safety descriptions to the three associated intrinsic APIs.