Skip to content

Commit

Permalink
Rollup merge of #125701 - scottmcm:generic-from-raw-parts, r=WaffleLa…
Browse files Browse the repository at this point in the history
…pkin

[ACP 362] genericize `ptr::from_raw_parts`

This implements rust-lang/libs-team#362

As such, it can partially undo rust-lang/rust#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).
  • Loading branch information
fmease authored May 29, 2024
2 parents 9ae3a61 + 3ba1459 commit fd5aa53
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit fd5aa53

Please sign in to comment.