rust/library/std/src/sys/pal/sgx
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
..
abi PinCoerceUnsized trait into core 2024-07-31 17:10:55 +08:00
waitqueue Reformat use declarations. 2024-07-29 08:26:52 +10:00
alloc.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
args.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
env.rs std: begin moving platform support modules into pal 2024-01-11 20:10:25 +01:00
fd.rs lib: replace some mem::forget's with ManuallyDrop 2024-07-15 22:01:09 +03:00
libunwind_integration.rs std: use queue-based RwLock on SGX 2024-04-11 19:36:30 +02:00
mod.rs std: refactor the TLS implementation 2024-06-15 17:47:35 +02:00
net.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
os.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
stdio.rs std: begin moving platform support modules into pal 2024-01-11 20:10:25 +01:00
thread.rs Insert some blank lines. 2024-07-30 07:25:15 +10:00
thread_parking.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
time.rs std: begin moving platform support modules into pal 2024-01-11 20:10:25 +01:00