-
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
offset_from: docs improvements #113797
offset_from: docs improvements #113797
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
r? apiraino |
r? rust-lang/libs |
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.
Typos.
Thank you! This is better, to be clear, so if you don't have any further thoughts or desire to improve this, I think it should go in, I just was wondering a little about thought process.
library/core/src/ptr/const_ptr.rs
Outdated
/// This function is the inverse of [`offset`]: it is valid to call if and only if | ||
/// `self` could have been computed as `origin.offset(n)` for some `n`, and it will | ||
/// then return that `n`. |
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.
Using the phrase "if and only if" makes me wonder "maybe this has a more natural way to say it?", as it then goes on to express itself as a counterfactual. It's a dual, and the text is correct, but not everyone will find the mental motion you are suggesting a very natural one to make.
Is the idea that this is a "shortcut" and that if they grok this then they can just skip the rest of the text, here?
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.
I guess I'm too much of a logician, "if and only if" sounds natural to me. ;)
It's not a counterfactual, not in a logical sense anyway... the symbolic way of expressing this is
self.offset_from(origin) == Ok(n) <-> origin.offset(n) == Ok(self)
(where the Ok
indicates non-UB execution)
Maybe there are better ways to put this into English?
"This function is well-defined with return value n
if and only if origin.offset(n)
is well-defined with return value self
."
Is the idea that this is a "shortcut" and that if they grok this then they can just skip the rest of the text, here?
Hm, not entirely sure. The claim about the inverse already existed before, but I thought it needs clarification since these are 2-input partial functions, so there is no obvious default meaning of "inverse".
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.
I suppose it's more of a "complement"?
Perhaps more direct about the constraint, then, something like:
"This is the inverse of [`offset`]: this function's returned `isize` will,
if used in `origin.offset(n)`, produce a pointer with the same address as `self`,
and if one would be UB to call then both are UB to call."
Maybe a small snippet in a Rust block, whatever seems to format nicest in ./x.py doc library --open
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.
I find that slightly ambiguous since "if one would be UB to call then both are UB to call" here is under the scope of "the function's returned isize
" but that already assumes that it was not UB to call. (A function that's UB doesn't return an isize
. It's like the function returns Result<isize, UB>
.)
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.
Oh, I'm certainly not trying to be precious about the exact wording. I just think that it should state this in two steps, because they're actually disjoint from the perspective of the programmer:
- The resulting value can be used as an argument in one function to produce the other one.
- The validity constraints (is that the right term?) for invoking either function are effectively mutual.
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.
The thing is, these steps are not separate though. It's a single equation:
self.offset_from(origin) == Ok(n) <-> origin.offset(n) == Ok(self)
This cannot be factored into two equations. Or at least I don't see how. To even talk about origin.offset(n)
you need to know n
but you only get that after assuming that offset_from
is not UB, and vice versa.
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.
It's one equation but the sequent looks like
A, B ⊢ C
doesn't it?
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.
No, it's A ⊣⊢ B
. It's completely symmetric.
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.
We can split the two directions of course:
- If
self.offset_from(origin)
is well-defined with resultn
, thenorigin.offset(n)
is well-defined with resultself
. - If
origin.offset(n)
is well-defined with resultself
, thenself.offset_from(origin)
is well-defined with resultn
.
But I don't see how that helps.
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.
Following #95851 I have removed the note about the "inverse" entirely, and replaced it by
/// This is equivalent to `(self as isize - origin as isize) / (mem::size_of::<T>() as isize)`,
/// except that it has a lot more opportunities for UB, in exchange for the compiler
/// better understanding what you are doing.
r? libs-api |
library/core/src/ptr/const_ptr.rs
Outdated
/// The requirement for pointers to be derived from the same allocated object is primarily | ||
/// needed for `const`-compatibility: at compile-time, pointers into *different* allocated | ||
/// objects do not have a known distance to each other. However, the requirement also exists at |
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.
Reviewing this again... Would it be correct to strengthen this claim to something more like "allocations don't necessarily have addresses during CTFE, just offsets from their base, so there is no such thing as a distance between two allocations"?
I know it amounts to the same, but after looking at it a few times, maybe I'm just experiencing semantic satiation, but I feel like "do not have a known distance" is slightly ambiguous, and this is basically my understanding of how it works. We should be clearer that the semantics of CTFE are allowed to be incomprehensible where we can, to dissuade anyone who imagines some "like a flat address space" model applies.
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.
Yeah both of these are correct ways to explain the situation. I don't know which one works better for most people.
We have existing guidance that is printed by the compiler when e.g. you try to transmute a pointer to an integer, which reads as follows:
this code performed an operation that depends on the underlying bytes representing a pointer
the absolute address of a pointer is not known at compile-time, so such operations are not supported
So I went with the same idea of "address is not known yet" here. We could also go with "the address has not been assigned yet" or something like that, but then we should do it consistently in the libs docs and compiler output, I think.
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.
Yeah, doing it consistently is a good point so that should be a separate issue probably.
I guess the alternative would be to do something like #95851, and remove the comment about it being an "inverse" entirely. |
db0eb2e
to
42c5ef1
Compare
42c5ef1
to
6c73f25
Compare
original source: rust-lang#95851
That does settle it I suppose, yes. |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (a6dfd89): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 634.388s -> 631.332s (-0.48%) |
23: Fix divergence from upstream `master` r=tshepang a=pvdrz * rust-lang/rust#116381 * rust-lang/rust#116360 * rust-lang/rust#116353 * rust-lang/rust#116406 * rust-lang/rust#116408 * rust-lang/rust#116395 * rust-lang/rust#116393 * rust-lang/rust#116388 * rust-lang/rust#116365 * rust-lang/rust#116363 * rust-lang/rust#116146 * rust-lang/rust#115961 * rust-lang/rust#116386 * rust-lang/rust#116367 * rust-lang/rust#105394 * rust-lang/rust#115301 * rust-lang/rust#116384 * rust-lang/rust#116379 * rust-lang/rust#116328 * rust-lang/rust#116282 * rust-lang/rust#116261 * rust-lang/rust#114654 * rust-lang/rust#116376 * rust-lang/rust#116374 * rust-lang/rust#116371 * rust-lang/rust#116358 * rust-lang/rust#116210 * rust-lang/rust#115863 * rust-lang/rust#115025 * rust-lang/rust#116372 * rust-lang/rust#116361 * rust-lang/rust#116355 * rust-lang/rust#116351 * rust-lang/rust#116158 * rust-lang/rust#115726 * rust-lang/rust#113053 * rust-lang/rust#116083 * rust-lang/rust#102099 * rust-lang/rust#116356 * rust-lang/rust#116350 * rust-lang/rust#116349 * rust-lang/rust#116289 * rust-lang/rust#114454 * rust-lang/rust#114453 * rust-lang/rust#116331 * rust-lang/rust#116346 * rust-lang/rust#116340 * rust-lang/rust#116326 * rust-lang/rust#116313 * rust-lang/rust#116276 * rust-lang/rust#115898 * rust-lang/rust#116325 * rust-lang/rust#116317 * rust-lang/rust#116207 * rust-lang/rust#116281 * rust-lang/rust#116304 * rust-lang/rust#116259 * rust-lang/rust#116228 * rust-lang/rust#116224 * rust-lang/rust#115554 * rust-lang/rust#116311 * rust-lang/rust#116299 * rust-lang/rust#116295 * rust-lang/rust#116292 * rust-lang/rust#116307 * rust-lang/rust#115670 * rust-lang/rust#116225 * rust-lang/rust#116302 * rust-lang/rust#116108 * rust-lang/rust#116160 * rust-lang/rust#116157 * rust-lang/rust#116127 * rust-lang/rust#116286 * rust-lang/rust#116254 * rust-lang/rust#116195 * rust-lang/rust#116280 * rust-lang/rust#115933 * rust-lang/rust#115546 * rust-lang/rust#115368 * rust-lang/rust#116275 * rust-lang/rust#116263 * rust-lang/rust#116241 * rust-lang/rust#116216 * rust-lang/rust#116030 * rust-lang/rust#116024 * rust-lang/rust#112123 * rust-lang/rust#113301 * rust-lang/rust#113797 * rust-lang/rust#115759 * rust-lang/rust#116260 * rust-lang/rust#116253 * rust-lang/rust#116245 * rust-lang/rust#116239 * rust-lang/rust#116234 * rust-lang/rust#116231 * rust-lang/rust#116201 * rust-lang/rust#116133 * rust-lang/rust#116176 * rust-lang/rust#116089 * rust-lang/rust#115986 Co-authored-by: ouz-a <ouz.agz@gmail.com> Co-authored-by: Jakub Beránek <berykubik@gmail.com> Co-authored-by: Federico Stra <stra.federico@gmail.com> Co-authored-by: bohan <bohan-zhang@foxmail.com> Co-authored-by: Jason Newcomb <jsnewcomb@pm.me> Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: bors <bors@rust-lang.org> Co-authored-by: Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de>
23: Fix divergence from upstream `master` r=tshepang a=pvdrz * rust-lang/rust#116483 * rust-lang/rust#116475 * rust-lang/rust#116329 * rust-lang/rust#116198 * rust-lang/rust#115588 * rust-lang/rust#115522 * rust-lang/rust#115454 * rust-lang/rust#111595 * rust-lang/rust#116018 * rust-lang/rust#116472 * rust-lang/rust#116469 * rust-lang/rust#116421 * rust-lang/rust#116463 * rust-lang/rust#101150 * rust-lang/rust#116269 * rust-lang/rust#116417 * rust-lang/rust#116455 * rust-lang/rust#116452 * rust-lang/rust#116428 * rust-lang/rust#116415 * rust-lang/rust#116288 * rust-lang/rust#116220 * rust-lang/rust#103046 * rust-lang/rust#114042 * rust-lang/rust#104153 * rust-lang/rust#116427 * rust-lang/rust#116443 * rust-lang/rust#116432 * rust-lang/rust#116431 * rust-lang/rust#116429 * rust-lang/rust#116296 * rust-lang/rust#116223 * rust-lang/rust#116273 * rust-lang/rust#116184 * rust-lang/rust#116370 * rust-lang/rust#114417 * rust-lang/rust#115200 * rust-lang/rust#116413 * rust-lang/rust#116381 * rust-lang/rust#116360 * rust-lang/rust#116353 * rust-lang/rust#116406 * rust-lang/rust#116408 * rust-lang/rust#116395 * rust-lang/rust#116393 * rust-lang/rust#116388 * rust-lang/rust#116365 * rust-lang/rust#116363 * rust-lang/rust#116146 * rust-lang/rust#115961 * rust-lang/rust#116386 * rust-lang/rust#116367 * rust-lang/rust#105394 * rust-lang/rust#115301 * rust-lang/rust#116384 * rust-lang/rust#116379 * rust-lang/rust#116328 * rust-lang/rust#116282 * rust-lang/rust#116261 * rust-lang/rust#114654 * rust-lang/rust#116376 * rust-lang/rust#116374 * rust-lang/rust#116371 * rust-lang/rust#116358 * rust-lang/rust#116210 * rust-lang/rust#115863 * rust-lang/rust#115025 * rust-lang/rust#116372 * rust-lang/rust#116361 * rust-lang/rust#116355 * rust-lang/rust#116351 * rust-lang/rust#116158 * rust-lang/rust#115726 * rust-lang/rust#113053 * rust-lang/rust#116083 * rust-lang/rust#102099 * rust-lang/rust#116356 * rust-lang/rust#116350 * rust-lang/rust#116349 * rust-lang/rust#116289 * rust-lang/rust#114454 * rust-lang/rust#114453 * rust-lang/rust#116331 * rust-lang/rust#116346 * rust-lang/rust#116340 * rust-lang/rust#116326 * rust-lang/rust#116313 * rust-lang/rust#116276 * rust-lang/rust#115898 * rust-lang/rust#116325 * rust-lang/rust#116317 * rust-lang/rust#116207 * rust-lang/rust#116281 * rust-lang/rust#116304 * rust-lang/rust#116259 * rust-lang/rust#116228 * rust-lang/rust#116224 * rust-lang/rust#115554 * rust-lang/rust#116311 * rust-lang/rust#116299 * rust-lang/rust#116295 * rust-lang/rust#116292 * rust-lang/rust#116307 * rust-lang/rust#115670 * rust-lang/rust#116225 * rust-lang/rust#116302 * rust-lang/rust#116108 * rust-lang/rust#116160 * rust-lang/rust#116157 * rust-lang/rust#116127 * rust-lang/rust#116286 * rust-lang/rust#116254 * rust-lang/rust#116195 * rust-lang/rust#116280 * rust-lang/rust#115933 * rust-lang/rust#115546 * rust-lang/rust#115368 * rust-lang/rust#116275 * rust-lang/rust#116263 * rust-lang/rust#116241 * rust-lang/rust#116216 * rust-lang/rust#116030 * rust-lang/rust#116024 * rust-lang/rust#112123 * rust-lang/rust#113301 * rust-lang/rust#113797 * rust-lang/rust#115759 * rust-lang/rust#116260 * rust-lang/rust#116253 * rust-lang/rust#116245 * rust-lang/rust#116239 * rust-lang/rust#116234 * rust-lang/rust#116231 * rust-lang/rust#116201 * rust-lang/rust#116133 * rust-lang/rust#116176 * rust-lang/rust#116089 * rust-lang/rust#115986 Co-authored-by: ouz-a <ouz.agz@gmail.com> Co-authored-by: bors <bors@rust-lang.org> Co-authored-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Co-authored-by: linkmauve <linkmauve@linkmauve.fr> Co-authored-by: onur-ozkan <work@onurozkan.dev> Co-authored-by: asquared31415 <34665709+asquared31415@users.noreply.github.com> Co-authored-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: Nadrieril <nadrieril+git@gmail.com> Co-authored-by: Raekye <Raekye@users.noreply.github.com> Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com> Co-authored-by: Zalathar <Zalathar@users.noreply.github.com>
23: Fix divergence from upstream `master` r=pietroalbini a=pvdrz * rust-lang/rust#116483 * rust-lang/rust#116475 * rust-lang/rust#116329 * rust-lang/rust#116198 * rust-lang/rust#115588 * rust-lang/rust#115522 * rust-lang/rust#115454 * rust-lang/rust#111595 * rust-lang/rust#116018 * rust-lang/rust#116472 * rust-lang/rust#116469 * rust-lang/rust#116421 * rust-lang/rust#116463 * rust-lang/rust#101150 * rust-lang/rust#116269 * rust-lang/rust#116417 * rust-lang/rust#116455 * rust-lang/rust#116452 * rust-lang/rust#116428 * rust-lang/rust#116415 * rust-lang/rust#116288 * rust-lang/rust#116220 * rust-lang/rust#103046 * rust-lang/rust#114042 * rust-lang/rust#104153 * rust-lang/rust#116427 * rust-lang/rust#116443 * rust-lang/rust#116432 * rust-lang/rust#116431 * rust-lang/rust#116429 * rust-lang/rust#116296 * rust-lang/rust#116223 * rust-lang/rust#116273 * rust-lang/rust#116184 * rust-lang/rust#116370 * rust-lang/rust#114417 * rust-lang/rust#115200 * rust-lang/rust#116413 * rust-lang/rust#116381 * rust-lang/rust#116360 * rust-lang/rust#116353 * rust-lang/rust#116406 * rust-lang/rust#116408 * rust-lang/rust#116395 * rust-lang/rust#116393 * rust-lang/rust#116388 * rust-lang/rust#116365 * rust-lang/rust#116363 * rust-lang/rust#116146 * rust-lang/rust#115961 * rust-lang/rust#116386 * rust-lang/rust#116367 * rust-lang/rust#105394 * rust-lang/rust#115301 * rust-lang/rust#116384 * rust-lang/rust#116379 * rust-lang/rust#116328 * rust-lang/rust#116282 * rust-lang/rust#116261 * rust-lang/rust#114654 * rust-lang/rust#116376 * rust-lang/rust#116374 * rust-lang/rust#116371 * rust-lang/rust#116358 * rust-lang/rust#116210 * rust-lang/rust#115863 * rust-lang/rust#115025 * rust-lang/rust#116372 * rust-lang/rust#116361 * rust-lang/rust#116355 * rust-lang/rust#116351 * rust-lang/rust#116158 * rust-lang/rust#115726 * rust-lang/rust#113053 * rust-lang/rust#116083 * rust-lang/rust#102099 * rust-lang/rust#116356 * rust-lang/rust#116350 * rust-lang/rust#116349 * rust-lang/rust#116289 * rust-lang/rust#114454 * rust-lang/rust#114453 * rust-lang/rust#116331 * rust-lang/rust#116346 * rust-lang/rust#116340 * rust-lang/rust#116326 * rust-lang/rust#116313 * rust-lang/rust#116276 * rust-lang/rust#115898 * rust-lang/rust#116325 * rust-lang/rust#116317 * rust-lang/rust#116207 * rust-lang/rust#116281 * rust-lang/rust#116304 * rust-lang/rust#116259 * rust-lang/rust#116228 * rust-lang/rust#116224 * rust-lang/rust#115554 * rust-lang/rust#116311 * rust-lang/rust#116299 * rust-lang/rust#116295 * rust-lang/rust#116292 * rust-lang/rust#116307 * rust-lang/rust#115670 * rust-lang/rust#116225 * rust-lang/rust#116302 * rust-lang/rust#116108 * rust-lang/rust#116160 * rust-lang/rust#116157 * rust-lang/rust#116127 * rust-lang/rust#116286 * rust-lang/rust#116254 * rust-lang/rust#116195 * rust-lang/rust#116280 * rust-lang/rust#115933 * rust-lang/rust#115546 * rust-lang/rust#115368 * rust-lang/rust#116275 * rust-lang/rust#116263 * rust-lang/rust#116241 * rust-lang/rust#116216 * rust-lang/rust#116030 * rust-lang/rust#116024 * rust-lang/rust#112123 * rust-lang/rust#113301 * rust-lang/rust#113797 * rust-lang/rust#115759 * rust-lang/rust#116260 * rust-lang/rust#116253 * rust-lang/rust#116245 * rust-lang/rust#116239 * rust-lang/rust#116234 * rust-lang/rust#116231 * rust-lang/rust#116201 * rust-lang/rust#116133 * rust-lang/rust#116176 * rust-lang/rust#116089 * rust-lang/rust#115986 Co-authored-by: bors <bors@rust-lang.org> Co-authored-by: ouz-a <ouz.agz@gmail.com> Co-authored-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Co-authored-by: linkmauve <linkmauve@linkmauve.fr> Co-authored-by: onur-ozkan <work@onurozkan.dev> Co-authored-by: asquared31415 <34665709+asquared31415@users.noreply.github.com> Co-authored-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: Nadrieril <nadrieril+git@gmail.com> Co-authored-by: Raekye <Raekye@users.noreply.github.com> Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com> Co-authored-by: Zalathar <Zalathar@users.noreply.github.com>
23: Fix divergence from upstream `master` r=Dajamante a=pvdrz * rust-lang/rust#116483 * rust-lang/rust#116475 * rust-lang/rust#116329 * rust-lang/rust#116198 * rust-lang/rust#115588 * rust-lang/rust#115522 * rust-lang/rust#115454 * rust-lang/rust#111595 * rust-lang/rust#116018 * rust-lang/rust#116472 * rust-lang/rust#116469 * rust-lang/rust#116421 * rust-lang/rust#116463 * rust-lang/rust#101150 * rust-lang/rust#116269 * rust-lang/rust#116417 * rust-lang/rust#116455 * rust-lang/rust#116452 * rust-lang/rust#116428 * rust-lang/rust#116415 * rust-lang/rust#116288 * rust-lang/rust#116220 * rust-lang/rust#103046 * rust-lang/rust#114042 * rust-lang/rust#104153 * rust-lang/rust#116427 * rust-lang/rust#116443 * rust-lang/rust#116432 * rust-lang/rust#116431 * rust-lang/rust#116429 * rust-lang/rust#116296 * rust-lang/rust#116223 * rust-lang/rust#116273 * rust-lang/rust#116184 * rust-lang/rust#116370 * rust-lang/rust#114417 * rust-lang/rust#115200 * rust-lang/rust#116413 * rust-lang/rust#116381 * rust-lang/rust#116360 * rust-lang/rust#116353 * rust-lang/rust#116406 * rust-lang/rust#116408 * rust-lang/rust#116395 * rust-lang/rust#116393 * rust-lang/rust#116388 * rust-lang/rust#116365 * rust-lang/rust#116363 * rust-lang/rust#116146 * rust-lang/rust#115961 * rust-lang/rust#116386 * rust-lang/rust#116367 * rust-lang/rust#105394 * rust-lang/rust#115301 * rust-lang/rust#116384 * rust-lang/rust#116379 * rust-lang/rust#116328 * rust-lang/rust#116282 * rust-lang/rust#116261 * rust-lang/rust#114654 * rust-lang/rust#116376 * rust-lang/rust#116374 * rust-lang/rust#116371 * rust-lang/rust#116358 * rust-lang/rust#116210 * rust-lang/rust#115863 * rust-lang/rust#115025 * rust-lang/rust#116372 * rust-lang/rust#116361 * rust-lang/rust#116355 * rust-lang/rust#116351 * rust-lang/rust#116158 * rust-lang/rust#115726 * rust-lang/rust#113053 * rust-lang/rust#116083 * rust-lang/rust#102099 * rust-lang/rust#116356 * rust-lang/rust#116350 * rust-lang/rust#116349 * rust-lang/rust#116289 * rust-lang/rust#114454 * rust-lang/rust#114453 * rust-lang/rust#116331 * rust-lang/rust#116346 * rust-lang/rust#116340 * rust-lang/rust#116326 * rust-lang/rust#116313 * rust-lang/rust#116276 * rust-lang/rust#115898 * rust-lang/rust#116325 * rust-lang/rust#116317 * rust-lang/rust#116207 * rust-lang/rust#116281 * rust-lang/rust#116304 * rust-lang/rust#116259 * rust-lang/rust#116228 * rust-lang/rust#116224 * rust-lang/rust#115554 * rust-lang/rust#116311 * rust-lang/rust#116299 * rust-lang/rust#116295 * rust-lang/rust#116292 * rust-lang/rust#116307 * rust-lang/rust#115670 * rust-lang/rust#116225 * rust-lang/rust#116302 * rust-lang/rust#116108 * rust-lang/rust#116160 * rust-lang/rust#116157 * rust-lang/rust#116127 * rust-lang/rust#116286 * rust-lang/rust#116254 * rust-lang/rust#116195 * rust-lang/rust#116280 * rust-lang/rust#115933 * rust-lang/rust#115546 * rust-lang/rust#115368 * rust-lang/rust#116275 * rust-lang/rust#116263 * rust-lang/rust#116241 * rust-lang/rust#116216 * rust-lang/rust#116030 * rust-lang/rust#116024 * rust-lang/rust#112123 * rust-lang/rust#113301 * rust-lang/rust#113797 * rust-lang/rust#115759 * rust-lang/rust#116260 * rust-lang/rust#116253 * rust-lang/rust#116245 * rust-lang/rust#116239 * rust-lang/rust#116234 * rust-lang/rust#116231 * rust-lang/rust#116201 * rust-lang/rust#116133 * rust-lang/rust#116176 * rust-lang/rust#116089 * rust-lang/rust#115986 35: Automated pull from `rust-lang/libc` r=pietroalbini a=github-actions[bot] This PR pulls the following changes from the [`rust-lang/libc`](https://github.com/rust-lang/libc) repository: * rust-lang/libc#3335 * rust-lang/libc#3373 * rust-lang/libc#3360 * rust-lang/libc#3374 * rust-lang/libc#3375 * rust-lang/libc#3376 * rust-lang/libc#3377 Co-authored-by: ouz-a <ouz.agz@gmail.com> Co-authored-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Co-authored-by: bors <bors@rust-lang.org> Co-authored-by: linkmauve <linkmauve@linkmauve.fr> Co-authored-by: onur-ozkan <work@onurozkan.dev> Co-authored-by: asquared31415 <34665709+asquared31415@users.noreply.github.com> Co-authored-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: Nadrieril <nadrieril+git@gmail.com> Co-authored-by: Raekye <Raekye@users.noreply.github.com> Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com> Co-authored-by: Zalathar <Zalathar@users.noreply.github.com> Co-authored-by: Nikolay Arhipov <nikolajs.arhipovs@gmail.com> Co-authored-by: Brian Cain <bcain@quicinc.com> Co-authored-by: Steve Lau <stevelauc@outlook.com> Co-authored-by: David CARLIER <devnexen@gmail.com> Co-authored-by: Louis Dupré Bertoni <louisdb@lespetitspedestres.org> Co-authored-by: Taiki Endo <te316e89@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This is the part of #112837 that doesn't add a new function, just tweaks the existing docs.