Matthias Krüger 16b251be10
Rollup merge of #125048 - dingxiangfei2009:stable-deref, r=amanieu
PinCoerceUnsized trait into core

cc ``@Darksonn`` ``@wedsonaf`` ``@ojeda``

This is a PR to introduce a `PinCoerceUnsized` trait in order to make trait impls generated by the proc-macro `#[derive(SmartPointer)]`, proposed by [RFC](e17e19ac7a/text/3621-derive-smart-pointer.md (pincoerceunsized-1)), sound. There you may find explanation, justification and discussion about the alternatives.

Note that we do not seek stabilization of this `PinCoerceUnsized` trait in the near future. The stabilisation of this trait does not block the eventual stabilization process of the `#[derive(SmartPointer)]` macro. Ideally, use of `DerefPure` is more preferrable except this will actually constitute a breaking change. `PinCoerceUnsized` emerges as a solution to the said soundness hole while avoiding the breaking change. More details on the `DerefPure` option have been described in this [section](e17e19ac7a/text/3621-derive-smart-pointer.md (derefpure)) of the RFC linked above.

Earlier discussion can be found in this [Zulip stream](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/Pin.20and.20soundness.20of.20unsizing.20coercions) and [rust-for-linux thread](https://rust-lang.zulipchat.com/#narrow/stream/425075-rust-for-linux/topic/.23.5Bderive.28SmartPointer.29.5D.20and.20pin.20unsoundness.20rfc.233621).

try-job: dist-various-2
2024-08-07 00:34:11 +02:00
..
2024-07-06 14:24:20 +02:00
2024-07-29 08:26:52 +10:00
2024-02-07 16:46:28 +01:00
2024-07-29 08:26:52 +10:00
2024-07-29 08:26:52 +10:00
2024-07-29 08:26:52 +10:00
2024-07-29 08:26:52 +10:00
2023-06-29 01:55:03 +02:00
2023-04-26 02:10:22 -04:00
2023-04-16 11:38:52 +00:00
2024-01-11 15:04:48 +03:00
2023-12-10 10:56:22 +08:00
2024-07-29 08:26:52 +10:00
2024-07-29 08:26:52 +10:00
2023-04-16 11:38:52 +00:00
2024-01-11 15:04:48 +03:00
2024-05-01 22:19:11 -04:00
2024-07-29 08:26:52 +10:00
2024-07-29 17:50:12 +01:00
2024-02-07 10:42:01 +08:00
2023-07-12 21:38:55 -04:00
2024-07-29 08:26:52 +10:00
2024-07-29 08:26:52 +10:00
2024-06-19 21:44:47 +01:00
2024-07-29 08:26:52 +10:00
2024-07-31 17:10:55 +08:00
2024-07-26 13:26:33 +01:00
2024-07-29 08:26:52 +10:00
2023-11-26 08:50:39 -05:00
2024-07-30 17:07:56 +01:00
2024-04-24 15:27:47 -07:00
2024-01-24 14:24:57 +01:00
2024-07-29 08:26:52 +10:00