rust/compiler
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
..
rustc The rustc crate feature is called jemalloc 2024-07-15 13:01:20 -04:00
rustc_abi interpret: simplify pointer arithmetic logic 2024-08-01 14:25:19 +02:00
rustc_arena Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_ast Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_ast_ir Use dep: for crate dependencies 2024-07-15 12:40:10 -04:00
rustc_ast_lowering Delegation: support generics for delegation from free functions 2024-07-29 20:04:55 +03:00
rustc_ast_passes Rollup merge of #127921 - spastorino:stabilize-unsafe-extern-blocks, r=compiler-errors 2024-08-03 20:51:51 +02:00
rustc_ast_pretty Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_attr Rollup merge of #128341 - Alexendoo:parse-version-pub, r=compiler-errors 2024-07-29 17:46:44 +02:00
rustc_baked_icu_data Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
rustc_borrowck Normalize when equating dyn tails in MIR borrowck 2024-08-05 14:28:06 -04:00
rustc_builtin_macros Rollup merge of #127907 - RalfJung:byte_slice_in_packed_struct_with_derive, r=nnethercote 2024-08-05 05:40:19 +02:00
rustc_codegen_cranelift Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
rustc_codegen_gcc Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
rustc_codegen_llvm Implement a implicit target feature mechanism 2024-08-04 08:44:23 +02:00
rustc_codegen_ssa Rollup merge of #128664 - fuzzypixelz:add-codegen-ssa-debug-impls, r=lcnr 2024-08-05 18:36:02 +02:00
rustc_const_eval interpret: move nullary-op evaluation into operator.rs 2024-08-05 22:42:34 +02:00
rustc_data_structures Auto merge of #128083 - Mark-Simulacrum:bump-bootstrap, r=albertlarsan68 2024-07-30 17:49:08 +00:00
rustc_driver Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
rustc_driver_impl Make RUSTC_OVERRIDE_VERSION_STRING overwrite the rendered version output, too 2024-07-30 14:08:02 +00:00
rustc_error_codes Stabilize offset_of_nested 2024-07-29 17:50:12 +01:00
rustc_error_messages Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_errors fix test 2024-08-06 19:09:52 +00:00
rustc_expand Add toggle for parse_meta_item unsafe parsing 2024-07-30 18:28:43 -05:00
rustc_feature Rollup merge of #127655 - RalfJung:invalid_type_param_default, r=compiler-errors 2024-08-05 05:40:19 +02:00
rustc_fluent_macro Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_fs_util Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_graphviz Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_hir Delegation: second attempt to improve perf 2024-07-31 18:58:04 +03:00
rustc_hir_analysis Auto merge of #125558 - Amanieu:const-asm-type, r=lcnr 2024-08-06 01:20:43 +00:00
rustc_hir_pretty Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_hir_typeck Auto merge of #125558 - Amanieu:const-asm-type, r=lcnr 2024-08-06 01:20:43 +00:00
rustc_incremental Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_index Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_index_macros Remove usage of specialization from newtype_index! 2024-06-30 16:42:53 +00:00
rustc_infer Use Vec in instantiate_binder_with_fresh_vars 2024-07-29 14:38:33 +03:00
rustc_interface Auto merge of #127543 - carbotaniuman:more_unsafe_attr_verification, r=estebank,traviscross 2024-08-01 10:40:45 +00:00
rustc_lexer Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_lint Rollup merge of #127907 - RalfJung:byte_slice_in_packed_struct_with_derive, r=nnethercote 2024-08-05 05:40:19 +02:00
rustc_lint_defs Rollup merge of #127907 - RalfJung:byte_slice_in_packed_struct_with_derive, r=nnethercote 2024-08-05 05:40:19 +02:00
rustc_llvm Disable MC/DC tests on LLVM 19 2024-07-30 10:22:48 +02:00
rustc_log Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_macros Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_metadata Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_middle Auto merge of #128441 - Bryanskiy:delegation-perf, r=petrochenkov 2024-08-03 23:45:22 +00:00
rustc_mir_build custom MIR: add support for tail calls 2024-08-05 18:23:14 +02:00
rustc_mir_dataflow Stop using MoveDataParamEnv for places that don't need a param-env 2024-07-29 11:59:47 -04:00
rustc_mir_transform Re-enable SimplifyToExp in match_branches. 2024-08-03 10:55:46 +08:00
rustc_monomorphize MIR required_consts, mentioned_items: ensure we do not forget to fill these lists 2024-08-01 15:49:25 +02:00
rustc_next_trait_solver Elaborate supertraits in dyn candidates 2024-08-05 10:03:17 -04:00
rustc_parse Rollup merge of #127921 - spastorino:stabilize-unsafe-extern-blocks, r=compiler-errors 2024-08-03 20:51:51 +02:00
rustc_parse_format Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_passes check_attr: cover multi-segment attributes on specific check arms 2024-08-04 01:50:55 +00:00
rustc_pattern_analysis Use a separate pattern type for rustc_pattern_analysis diagnostics 2024-07-31 16:03:27 +10:00
rustc_privacy Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_query_impl Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_query_system chore: use shorthand initializer 2024-08-02 13:22:28 -04:00
rustc_resolve docs(resolve): more explain about target 2024-08-04 15:38:11 +08:00
rustc_sanitizers Use ParamEnv::reveal_all in CFI 2024-08-02 23:24:50 -04:00
rustc_serialize Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_session linker: Pass fewer search directories to the linker 2024-08-03 14:20:18 +03:00
rustc_smir Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_span Rollup merge of #125048 - dingxiangfei2009:stable-deref, r=amanieu 2024-08-07 00:34:11 +02:00
rustc_symbol_mangling Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_target Rollup merge of #122049 - Amanieu:riscv64-musl-tier2, r=Mark-Simulacrum 2024-08-05 23:35:22 +02:00
rustc_trait_selection fix rebase 2024-08-06 17:54:39 +00:00
rustc_traits Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_transmute Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_ty_utils Auto merge of #128083 - Mark-Simulacrum:bump-bootstrap, r=albertlarsan68 2024-07-30 17:49:08 +00:00
rustc_type_ir Auto merge of #128689 - matthiaskrgr:rollup-ukyn8wq, r=matthiaskrgr 2024-08-05 17:03:58 +00:00
rustc_type_ir_macros Reformat use declarations. 2024-07-29 08:26:52 +10:00
stable_mir Reformat use declarations. 2024-07-29 08:26:52 +10:00