[ACP 362] genericize `ptr::from_raw_parts` by scottmcm · Pull Request #125701 · rust-lang/rust
rustbot
added
S-waiting-on-review
labels
May 29, 2024
bors
added
S-waiting-on-bors
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.labels
May 29, 2024fmease added a commit to fmease/rust that referenced this pull request
May 29, 2024…=WaffleLapkin [ACP 362] genericize `ptr::from_raw_parts` This implements rust-lang/libs-team#362 As such, it can partially undo rust-lang#124795 , letting `slice_from_raw_parts` just call `from_raw_parts` again without re-introducing the unnecessary cast to MIR. By doing this it also removes a spurious cast from `str::from_raw_parts`. And I think it does a good job of showing the value of the ACP, since the only thing that needed new turbofishing because of this is inside `ptr::null(_mut)`, but only because `ptr::without_provenance(_mut)` doesn't support pointers to extern types, which it absolutely could (without even changing the implementation).
This was referenced
May 29, 2024bors added a commit to rust-lang-ci/rust that referenced this pull request
May 30, 2024Rollup of 7 pull requests Successful merges: - rust-lang#125653 (Migrate `run-make/const-prop-lint` to `rmake.rs`) - rust-lang#125662 (Rewrite `fpic`, `simple-dylib` and `issue-37893` `run-make` tests in `rmake.rs` or ui test format) - rust-lang#125699 (Streamline `x fmt` and improve its output) - rust-lang#125701 ([ACP 362] genericize `ptr::from_raw_parts`) - rust-lang#125723 (Migrate `run-make/crate-data-smoke` to `rmake.rs`) - rust-lang#125733 (Add lang items for `AsyncFn*`, `Future`, `AsyncFnKindHelper`'s associated types) - rust-lang#125734 (ast: Revert a breaking attribute visiting order change) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
May 30, 2024Rollup merge of rust-lang#125701 - scottmcm:generic-from-raw-parts, r=WaffleLapkin [ACP 362] genericize `ptr::from_raw_parts` This implements rust-lang/libs-team#362 As such, it can partially undo rust-lang#124795 , letting `slice_from_raw_parts` just call `from_raw_parts` again without re-introducing the unnecessary cast to MIR. By doing this it also removes a spurious cast from `str::from_raw_parts`. And I think it does a good job of showing the value of the ACP, since the only thing that needed new turbofishing because of this is inside `ptr::null(_mut)`, but only because `ptr::without_provenance(_mut)` doesn't support pointers to extern types, which it absolutely could (without even changing the implementation).
scottmcm
deleted the
generic-from-raw-parts
branch
This was referenced
Nov 11, 2024This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters