Files
rust/library/core/src
Trevor Gross c36a39cd1f 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.
2024-07-17 19:53:28 -05:00
..
2024-05-04 22:56:35 +01:00
2024-06-30 14:54:05 -04:00
2024-07-05 16:33:58 -06:00
2024-07-12 18:09:44 -06:00
2024-07-05 16:33:58 -06:00
2024-07-01 14:14:22 +02:00
2024-06-30 13:36:44 -04:00
2024-05-09 17:04:30 +02:00
2024-06-11 16:52:02 +02:00
2024-07-02 11:25:31 +08:00
2024-07-04 22:05:00 +08:00
2024-06-11 15:47:00 +02:00
2024-07-04 14:56:08 +08:00
2024-06-19 21:44:47 +01:00
2024-04-08 11:57:17 +00:00
2024-06-07 12:18:43 -07:00
2024-07-05 16:33:58 -06:00
2024-06-29 21:03:12 +02:00