rust/compiler
Matthias Krüger 67872e740e
Rollup merge of #123840 - scottmcm:aggregate-kind-rawptr, r=cjgillot
Add an intrinsic for `ptr::from_raw_parts(_mut)`

Fixes #123174
cc `@CAD97` `@saethlin`
r? `@cjgillot`

As suggested in https://github.com/rust-lang/rust/pull/123190#issuecomment-2028717967, this adds a new `AggregateKind::RawPtr` for creating a pointer from its data pointer and its metadata.

That means that `slice::from_raw_parts` and friends no longer need to hard-code pointer layout into `libcore`, and because it no longer does union hacks the MIR is shorter and more amenable to optimizations.
2024-04-21 21:56:32 +02:00
..
rustc
rustc_abi Use the Align type when parsing alignment attributes 2024-04-01 03:05:55 +01:00
rustc_arena rename ptr::invalid -> ptr::without_provenance 2024-02-21 20:15:52 +01:00
rustc_ast Auto merge of #124008 - nnethercote:simpler-static_assert_size, r=Nilstrieb 2024-04-18 09:47:45 +00:00
rustc_ast_ir introduce Mutability::ptr_str 2024-04-10 18:51:09 +02:00
rustc_ast_lowering Rollup merge of #123935 - tstsrt:fix-115423, r=oli-obk 2024-04-18 21:38:55 -07:00
rustc_ast_passes Rename BindingAnnotation to BindingMode 2024-04-17 09:34:39 -04:00
rustc_ast_pretty Give a name to each distinct manipulation of pretty-printer FixupContext 2024-04-19 23:49:44 -07:00
rustc_attr Use the Align type when parsing alignment attributes 2024-04-01 03:05:55 +01:00
rustc_baked_icu_data
rustc_borrowck Add AggregateKind::RawPtr and enough support to compile 2024-04-21 11:08:37 -07:00
rustc_builtin_macros Rename BindingAnnotation to BindingMode 2024-04-17 09:34:39 -04:00
rustc_codegen_cranelift Also handle AggregateKind::RawPtr in cg_cranelift 2024-04-21 11:08:37 -07:00
rustc_codegen_gcc Rollup merge of #123967 - RalfJung:static_mut_refs, r=Nilstrieb 2024-04-20 21:45:35 +01:00
rustc_codegen_llvm coverage. Lowering MC/DC statements to llvm-ir 2024-04-20 00:34:40 +08:00
rustc_codegen_ssa Use it in the library, and InstSimplify it away in the easy places 2024-04-21 11:08:37 -07:00
rustc_const_eval Address PR feedback 2024-04-21 11:08:37 -07:00
rustc_data_structures Add tests for predecessor-aware VecGraph mode 2024-04-18 17:32:42 +00:00
rustc_driver
rustc_driver_impl Fix pretty hir for anon consts in diagnostics 2024-04-15 18:48:12 -04:00
rustc_error_codes Update compiler/rustc_error_codes/src/error_codes/E0384.md 2024-04-12 22:43:38 +09:00
rustc_error_messages Rename SubdiagnosticMessage as SubdiagMessage. 2024-03-05 12:14:49 +11:00
rustc_errors Print note with closure signature on type mismatch 2024-04-20 15:48:27 +02:00
rustc_expand Auto merge of #124008 - nnethercote:simpler-static_assert_size, r=Nilstrieb 2024-04-18 09:47:45 +00:00
rustc_feature Rollup merge of #123512 - Jules-Bertholet:ref-pat-eat-one-layer-2024, r=Nadrieril 2024-04-16 21:41:24 +02:00
rustc_fluent_macro Rename SubdiagnosticMessage as SubdiagMessage. 2024-03-05 12:14:49 +11:00
rustc_fs_util Invert diagnostic lints. 2024-02-06 13:12:33 +11:00
rustc_graphviz Invert diagnostic lints. 2024-02-06 13:12:33 +11:00
rustc_hir Auto merge of #124008 - nnethercote:simpler-static_assert_size, r=Nilstrieb 2024-04-18 09:47:45 +00:00
rustc_hir_analysis Add an intrinsic that lowers to AggregateKind::RawPtr 2024-04-21 11:08:37 -07:00
rustc_hir_pretty Rename BindingAnnotation to BindingMode 2024-04-17 09:34:39 -04:00
rustc_hir_typeck Correctly change type when adding adjustments on top of NeverToAny 2024-04-19 11:05:02 +00:00
rustc_incremental Auto merge of #122070 - Zoxc:dep-edges-from-previous, r=cjgillot 2024-04-05 11:11:17 +00:00
rustc_index Simplify static_assert_sizes. 2024-04-18 15:36:25 +10:00
rustc_index_macros rustc_index: Add a ZERO constant to index types 2024-04-03 19:06:22 +03:00
rustc_infer Rollup merge of #123379 - wutchzone:119266, r=compiler-errors 2024-04-20 21:45:34 +01:00
rustc_interface Rollup merge of #123409 - ZhuUx:master, r=oli-obk 2024-04-20 11:10:31 +02:00
rustc_lexer Properly handle emojis as literal prefix in macros 2024-04-10 23:19:27 +00:00
rustc_lint Auto merge of #123594 - Urgau:fix-non_local_def-lint-overflow, r=lcnr 2024-04-21 17:02:03 +00:00
rustc_lint_defs Rename feature gate 2024-04-15 23:27:21 -04:00
rustc_llvm Rollup merge of #124132 - RalfJung:OpBundlesIndirect, r=Mark-Simulacrum 2024-04-20 21:45:37 +01:00
rustc_log Construct SourceMap at the same time as SessionGlobals. 2024-04-16 13:02:53 +10:00
rustc_macros Rename diagnostic derive things. 2024-03-11 10:06:34 +11:00
rustc_metadata linker: Remove laziness and caching from native search directory walks 2024-04-12 17:28:00 +03:00
rustc_middle Add AggregateKind::RawPtr and enough support to compile 2024-04-21 11:08:37 -07:00
rustc_mir_build Rollup merge of #123409 - ZhuUx:master, r=oli-obk 2024-04-20 11:10:31 +02:00
rustc_mir_dataflow Actually create ranged int types in the type system. 2024-04-08 12:02:19 +00:00
rustc_mir_transform Address more PR feedback 2024-04-21 11:08:38 -07:00
rustc_monomorphize move the LargeAssignments lint logic into its own file 2024-04-14 18:09:44 +02:00
rustc_next_trait_solver Auto merge of #122077 - oli-obk:eager_opaque_checks4, r=lcnr 2024-04-08 23:01:50 +00:00
rustc_parse Rollup merge of #123752 - estebank:emoji-prefix, r=wesleywiser 2024-04-18 21:38:55 -07:00
rustc_parse_format Simplify static_assert_sizes. 2024-04-18 15:36:25 +10:00
rustc_passes Rename BindingAnnotation to BindingMode 2024-04-17 09:34:39 -04:00
rustc_pattern_analysis Actually create ranged int types in the type system. 2024-04-08 12:02:19 +00:00
rustc_privacy Actually create ranged int types in the type system. 2024-04-08 12:02:19 +00:00
rustc_query_impl move QueryKeyStringCache from rustc_middle to rustc_query_impl, where it actually used 2024-04-11 14:33:48 +03:00
rustc_query_system remove some things that do not need to be 2024-04-11 21:09:52 +02:00
rustc_resolve Rename BindingAnnotation to BindingMode 2024-04-17 09:34:39 -04:00
rustc_sanitizers Update encode.rs 2024-04-14 14:56:41 +02:00
rustc_serialize Add add/sub methods that only panic with debug assertions to rustc 2024-04-13 17:03:12 +02:00
rustc_session Rollup merge of #123409 - ZhuUx:master, r=oli-obk 2024-04-20 11:10:31 +02:00
rustc_smir Add AggregateKind::RawPtr and enough support to compile 2024-04-21 11:08:37 -07:00
rustc_span Add an intrinsic that lowers to AggregateKind::RawPtr 2024-04-21 11:08:37 -07:00
rustc_symbol_mangling Update v0.rs 2024-04-14 15:01:04 +02:00
rustc_target Auto merge of #117457 - daxpedda:wasm-nontrapping-fptoint, r=wesleywiser 2024-04-21 06:32:10 +00:00
rustc_trait_selection Let inherent associated types constrain opaque types during projection 2024-04-19 16:12:54 +00:00
rustc_traits Merge check_mod_impl_wf and check_mod_type_wf 2024-03-07 06:27:09 +00:00
rustc_transmute ScalarInt: add methods to assert being a (u)int of given size 2024-04-19 13:51:52 +02:00
rustc_ty_utils Auto merge of #117919 - daxpedda:wasm-c-abi, r=wesleywiser 2024-04-19 03:35:10 +00:00
rustc_type_ir Rollup merge of #123797 - amandasystems:better-graphviz, r=oli-obk 2024-04-16 15:19:14 +02:00
stable_mir Add AggregateKind::RawPtr and enough support to compile 2024-04-21 11:08:37 -07:00