-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Replace usages of ptr::offset with ptr::{add,sub}. #53329
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
bae39fb
to
98bff7d
Compare
Relevant clippy issue: rust-lang/rust-clippy#3047 |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
98bff7d
to
8339384
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
8339384
to
883f5a0
Compare
r? @RalfJung |
LGTM! @bors r+ Is this a rollup candidate? |
📌 Commit 883f5a0ee23c457997f49ec62ccf0b7c3eb8018e has been approved by |
☔ The latest upstream changes (presumably #52953) made this pull request unmergeable. Please resolve the merge conflicts. |
883f5a0
to
6bf6d50
Compare
@bors r=RalfJung |
📌 Commit 276299b73cb2496baa0588ad14f548fb6f701d15 has been approved by |
src/libcore/slice/mod.rs
Outdated
@@ -1843,7 +1843,7 @@ impl<T> [T] { | |||
let mut_ptr = rest.as_mut_ptr(); | |||
(left, | |||
from_raw_parts_mut(mut_ptr as *mut U, us_len), | |||
from_raw_parts_mut(mut_ptr.offset((rest.len() - ts_len) as isize), ts_len)) | |||
from_raw_parts_mut(mut_ptr.add(rest.len()), ts_len)) |
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.
Is this correct? 🤔
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.
Wow, very good catch 😓
Addressed in the latest force push
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.
⌛ Testing commit 993fb93 with merge 748cc6512dec01cc2700faa369c7384cc1be8bb5... |
💥 Test timed out |
Bors timeout? @rust-lang/infra @bors retry |
The macs run for more than 4 hours on Travis. |
Replace usages of ptr::offset with ptr::{add,sub}. Rust provides these helper methods – so let's use them!
@bors retry |
⌛ Testing commit 993fb93 with merge e359b2bc08c908ea9bc0a9a5d2592c931c7a207f... |
💔 Test failed - status-appveyor |
What is this?
Looks like network trouble to me. @bors retry |
…lfJung Replace usages of ptr::offset with ptr::{add,sub}. Rust provides these helper methods – so let's use them!
Rollup of 17 pull requests Successful merges: - #53030 (Updated RELEASES.md for 1.29.0) - #53104 (expand the documentation on the `Unpin` trait) - #53213 (Stabilize IP associated constants) - #53296 (When closure with no arguments was expected, suggest wrapping) - #53329 (Replace usages of ptr::offset with ptr::{add,sub}.) - #53363 (add individual docs to `core::num::NonZero*`) - #53370 (Stabilize macro_vis_matcher) - #53393 (Mark libserialize functions as inline) - #53405 (restore the page title after escaping out of a search) - #53452 (Change target triple used to check for lldb in build-manifest) - #53462 (Document Box::into_raw returns non-null ptr) - #53465 (Remove LinkMeta struct) - #53492 (update lld submodule to include RISCV patch) - #53496 (Fix typos found by codespell.) - #53521 (syntax: Optimize some literal parsing) - #53540 (Moved issue-53157.rs into src/test/ui/consts/const-eval/) - #53551 (Avoid some Place clones.) Failed merges: r? @ghost
Rust provides these helper methods – so let's use them!