-
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
slice::from_raw_parts: mention no-wrap-around condition #112704
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
/// * The entire memory range of this slice must be contained within a single allocated object! | ||
/// Slices can never span across multiple allocated objects. |
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 moved this to the top level since having it as a sub-clause of "N
consecutive properly initialized values of type T
" doesn't really make sense IMO.
This makes sense to me, thanks! @bors r+ |
⌛ Testing commit 18b8646 with merge 226c869c4566938452eb8d3c6e18a2979e211064... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry rollup |
…Denton slice::from_raw_parts: mention no-wrap-around condition Cc rust-lang#83996. This probably needs to be mentioned in more places, so I am not closing that issue, but this here should help at least.
…Denton slice::from_raw_parts: mention no-wrap-around condition Cc rust-lang#83996. This probably needs to be mentioned in more places, so I am not closing that issue, but this here should help at least.
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#111747 (Don't structurally resolve during method ambiguity in probe) - rust-lang#112704 (slice::from_raw_parts: mention no-wrap-around condition) - rust-lang#112927 (Fix indentation for where clause in rustdoc pages) - rust-lang#112933 (Avoid `&format` in error message code) - rust-lang#112935 (style-guide: Fix typo) - rust-lang#112941 (typo) - rust-lang#112942 (style-guide: Organizational and editing tweaks (no semantic changes)) - rust-lang#112944 (style-guide: Add language disclaiming any effects on non-default Rust styles) - rust-lang#112948 (Avoid guessing unknown trait implementation in suggestions) r? `@ghost` `@rustbot` modify labels: rollup
Cc #83996. This probably needs to be mentioned in more places, so I am not closing that issue, but this here should help at least.