rust/library/std/src
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
..
backtrace remove redundant imports 2023-12-10 10:56:22 +08:00
collections Reformat use declarations. 2024-07-29 08:26:52 +10:00
env remove redundant imports 2023-12-10 10:56:22 +08:00
error Reformat use declarations. 2024-07-29 08:26:52 +10:00
f16 Auto merge of #128083 - Mark-Simulacrum:bump-bootstrap, r=albertlarsan68 2024-07-30 17:49:08 +00:00
f32 Reformat use declarations. 2024-07-29 08:26:52 +10:00
f64 Reformat use declarations. 2024-07-29 08:26:52 +10:00
f128 Auto merge of #128083 - Mark-Simulacrum:bump-bootstrap, r=albertlarsan68 2024-07-30 17:49:08 +00:00
ffi Reformat use declarations. 2024-07-29 08:26:52 +10:00
fs Reformat use declarations. 2024-07-29 08:26:52 +10:00
hash Reformat use declarations. 2024-07-29 08:26:52 +10:00
io Auto merge of #128083 - Mark-Simulacrum:bump-bootstrap, r=albertlarsan68 2024-07-30 17:49:08 +00:00
net Reformat use declarations. 2024-07-29 08:26:52 +10:00
num removed nonfunctioning benchmark 2024-01-11 11:30:12 -05:00
os Rollup merge of #127586 - zachs18:more-must-use, r=cuviper 2024-08-03 11:17:42 +02:00
panic
path Reformat use declarations. 2024-07-29 08:26:52 +10:00
pipe Cleanup sys module to match house style 2024-07-30 19:22:54 +00:00
prelude Avoid comments that describe multiple use items. 2024-07-17 08:02:46 +10:00
process Reformat use declarations. 2024-07-29 08:26:52 +10:00
sync Auto merge of #128461 - matthiaskrgr:rollup-3dpp11g, r=matthiaskrgr 2024-08-01 02:26:32 +00:00
sys Rollup merge of #125048 - dingxiangfei2009:stable-deref, r=amanieu 2024-08-07 00:34:11 +02:00
sys_common Reformat use declarations. 2024-07-29 08:26:52 +10:00
thread Reformat use declarations. 2024-07-29 08:26:52 +10:00
time Reformat use declarations. 2024-07-29 08:26:52 +10:00
alloc.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
ascii.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
backtrace.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
env.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
error.rs chore: refactor backtrace formatting 2024-08-02 00:24:29 +09:00
f16.rs Auto merge of #128083 - Mark-Simulacrum:bump-bootstrap, r=albertlarsan68 2024-07-30 17:49:08 +00:00
f32.rs android: Remove libstd hacks for unsupported Android APIs 2024-07-31 01:03:36 +00:00
f64.rs android: Remove libstd hacks for unsupported Android APIs 2024-07-31 01:03:36 +00:00
f128.rs Auto merge of #128083 - Mark-Simulacrum:bump-bootstrap, r=albertlarsan68 2024-07-30 17:49:08 +00:00
fs.rs Auto merge of #128083 - Mark-Simulacrum:bump-bootstrap, r=albertlarsan68 2024-07-30 17:49:08 +00:00
keyword_docs.rs Fix doc nits 2024-07-26 13:26:33 +01:00
lib.miri.rs add 'x.py miri', and make it work for 'library/{core,alloc,std}' 2024-04-03 20:27:20 +02:00
lib.rs Rollup merge of #125048 - dingxiangfei2009:stable-deref, r=amanieu 2024-08-07 00:34:11 +02:00
macros.rs Document the column numbers for the dbg! macro 2024-07-17 14:10:41 +02:00
num.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
panic.rs chore: refactor backtrace style in panic 2024-08-03 11:12:16 +09:00
panicking.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
pat.rs Add pattern types to parser 2024-04-08 11:57:17 +00:00
path.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
pipe.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
process.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
rt.rs Use #[rustfmt::skip] on some use groups to prevent reordering. 2024-07-19 13:26:48 +10:00
time.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00