diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2024-07-17 19:53:28 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-17 19:53:28 -0500 |
| commit | c36a39cd1ff78ec1336264d5a109ea96ae6642d4 (patch) | |
| tree | a6e73e45e7b81a3969ddeb498270f8e7d972ea70 /compiler/rustc_codegen_gcc | |
| parent | 3c4f820c5bf6627faf7c5e4bb1837ad47275b2b6 (diff) | |
| parent | f9c0d3370f04d08cda2da268a54bc543eb310fc7 (diff) | |
| download | rust-c36a39cd1ff78ec1336264d5a109ea96ae6642d4.tar.gz rust-c36a39cd1ff78ec1336264d5a109ea96ae6642d4.zip | |
Rollup merge of #127859 - RalfJung:ptr-dyn-metadata, r=scottmcm
ptr::metadata: avoid references to extern types References to `extern types` are somewhat dubious entities, since generally we say that references must be dereferenceable for their size as determined via `size_of_val`, but with `extern type` that is an ill-defined statement. I'd like to make Miri warn for such cases since it interacts poorly with Stacked Borrows. To avoid warnings people can't fix, this requires not using references to `extern type` in the standard library, and I think `DynMetadata` is the only currently remaining use. so this changes `DynMetadata` to use a NonNull raw pointer instead. Given that the alignment was 1, this shouldn't really change anything meaningful. I also updated a comment added by `@scottmcm` in https://github.com/rust-lang/rust/pull/125479, since I think the old comment is wrong. The `DynMetadata` type itself is not special, it is a normal aggregate. But computing field types for wide pointers (including references) is special.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
