diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-04-21 21:56:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-21 21:56:32 +0200 |
| commit | 67872e740eb608b0c5bae7021e106285398c9bc4 (patch) | |
| tree | 0741da309e4454c4b0780c1114d856b003174e5e /tests/codegen/array-codegen.rs | |
| parent | f22a0c2d9f9cd83dfe84b65e9fa1b3fa8303c7b5 (diff) | |
| parent | 5e785b1420d8d26f360a33919700868c877cbbbc (diff) | |
| download | rust-67872e740eb608b0c5bae7021e106285398c9bc4.tar.gz rust-67872e740eb608b0c5bae7021e106285398c9bc4.zip | |
Rollup merge of #123840 - scottmcm:aggregate-kind-rawptr, r=cjgillot
Add an intrinsic for `ptr::from_raw_parts(_mut)` Fixes #123174 cc `@CAD97` `@saethlin` r? `@cjgillot` As suggested in https://github.com/rust-lang/rust/pull/123190#issuecomment-2028717967, this adds a new `AggregateKind::RawPtr` for creating a pointer from its data pointer and its metadata. That means that `slice::from_raw_parts` and friends no longer need to hard-code pointer layout into `libcore`, and because it no longer does union hacks the MIR is shorter and more amenable to optimizations.
Diffstat (limited to 'tests/codegen/array-codegen.rs')
0 files changed, 0 insertions, 0 deletions
