mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-02 09:27:51 +00:00
Clarify that UB will occur, not can/may in GlobalAlloc docs These doc comments start out very clear by saying the caller "must" or "has to" ensure something, but the end with some form of "otherwise undefined behavior may result" which sounds like it is implementation-defined and seems to conflict with the way the paragraph starts. Consistent phrasing makes it clearer that when the safety precondition is violated, UB is encountered. Some of the phrasing here is a bit awkward to me, I don't think we usually say "the behavior is undefined" `@RalfJung` right? But in either case I'm trying to be surgical in my edit here. r? Amanieu