rust/compiler
Matthias Krüger bc0262d0f1
Rollup merge of #143327 - RalfJung:miri-type-validity-error, r=oli-obk
miri: improve errors for type validity assertion failures

Miri has pretty nice errors for type validity violations, printing which field in the type the problem occurs at and so on.

However, we don't see these errors when using e.g. `mem::zeroed` as that uses `assert_zero_valid` to bail out before Miri can detect the UB.

Similar to what we did with `@saethlin's` UB checks, I think we should disable such language UB checks in Miri so that we can get better error messages. If we go for this we should probably say this in the intrinsic docs as well so that people don't think they can rely on these intrinsics catching anything.

Furthermore, I slightly changed `MaybeUninit::assume_init` so that the `.value` field does not show up in error messages any more.

`@rust-lang/miri` what do you think?
2025-07-03 05:21:36 +02:00
..
rustc
rustc_abi move discr=varid check to layout_sanity_check 2025-06-28 14:47:27 +02:00
rustc_arena Introduce Arena::try_alloc_from_iter. 2025-04-19 01:13:18 +00:00
rustc_ast Rollup merge of #142237 - benschulz:unused-parens-fn, r=fee1-dead 2025-07-02 19:29:35 +02:00
rustc_ast_ir Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_ast_lowering Rollup merge of #142237 - benschulz:unused-parens-fn, r=fee1-dead 2025-07-02 19:29:35 +02:00
rustc_ast_passes Auto merge of #143214 - camsteffen:remove-let-chains-feature, r=est31 2025-07-02 17:18:47 +00:00
rustc_ast_pretty Remove support for dyn* 2025-07-01 19:00:21 +00:00
rustc_attr_data_structures Port #[rustc_object_lifetime_default] to the new attribute parsing infrastructure 2025-07-01 16:31:23 +02:00
rustc_attr_parsing Rollup merge of #142964 - GrigorenkoPV:attributes/argless, r=oli-obk 2025-07-02 19:29:36 +02:00
rustc_baked_icu_data
rustc_borrowck Auto merge of #143036 - compiler-errors:no-dyn-star, r=oli-obk 2025-07-01 21:50:21 +00:00
rustc_builtin_macros Update cfg(bootstrap) 2025-07-01 10:55:49 -07:00
rustc_codegen_cranelift Remove support for dyn* 2025-07-01 19:00:21 +00:00
rustc_codegen_gcc Auto merge of #143254 - matthiaskrgr:rollup-7x8bxek, r=matthiaskrgr 2025-06-30 22:36:52 +00:00
rustc_codegen_llvm Rollup merge of #143125 - tgross35:aarch64-neon-llvm19-f16, r=cuviper 2025-07-01 04:25:34 +02:00
rustc_codegen_ssa Rollup merge of #143194 - folkertdev:fix-single-element-simd-bitcast, r=workingjubilee 2025-07-02 19:28:06 +02:00
rustc_const_eval Rollup merge of #143327 - RalfJung:miri-type-validity-error, r=oli-obk 2025-07-03 05:21:36 +02:00
rustc_data_structures Auto merge of #142978 - Kobzol:query-hit, r=oli-obk 2025-07-02 11:41:14 +00:00
rustc_driver Remove recursion_limit increases. 2025-04-02 16:25:27 +11:00
rustc_driver_impl Rollup merge of #143019 - danielframpton:codegen-backend-parse, r=bjorn3 2025-06-30 20:49:40 +02:00
rustc_error_codes compiler: Trim the misleading C of C-cmse from errors 2025-06-25 00:52:10 -07:00
rustc_error_messages Remove unused feature gates 2025-06-28 23:36:46 +00:00
rustc_errors Update cfg(bootstrap) 2025-07-01 10:55:49 -07:00
rustc_expand Rollup merge of #143070 - joshtriplett:macro-rules-parse, r=petrochenkov 2025-07-02 19:29:37 +02:00
rustc_feature Auto merge of #143214 - camsteffen:remove-let-chains-feature, r=est31 2025-07-02 17:18:47 +00:00
rustc_fluent_macro Remove all unused feature gates from the compiler 2025-06-08 14:50:42 +00:00
rustc_fs_util Retry if creating temp fails with access denied 2025-04-25 11:28:36 +00:00
rustc_graphviz
rustc_hashes
rustc_hir Auto merge of #143036 - compiler-errors:no-dyn-star, r=oli-obk 2025-07-01 21:50:21 +00:00
rustc_hir_analysis Rollup merge of #143292 - compiler-errors:explicit-generic, r=oli-obk 2025-07-03 05:21:33 +02:00
rustc_hir_pretty Remove support for dyn* 2025-07-01 19:00:21 +00:00
rustc_hir_typeck Remove support for dyn* 2025-07-01 19:00:21 +00:00
rustc_incremental Auto merge of #139758 - Zoxc:thread-local-graph, r=oli-obk 2025-05-07 12:39:54 +00:00
rustc_index index: add method for checking range on DenseBitSet 2025-06-04 00:47:12 +02:00
rustc_index_macros In rustc_mir_tranform, iterate over index newtypes instead of ints 2025-04-12 11:53:07 +00:00
rustc_infer Update cfg(bootstrap) 2025-07-01 10:55:49 -07:00
rustc_interface Rollup merge of #143228 - nnethercote:macro-stats-build-scripts, r=Kobzol 2025-06-30 20:49:43 +02:00
rustc_lexer rustc_lexer: typo fix + small cleanups 2025-06-06 13:08:16 +00:00
rustc_lint Rollup merge of #143306 - samueltardieu:track-clippy-lints-emission, r=petrochenkov 2025-07-02 19:29:39 +02:00
rustc_lint_defs make tidy-alphabetical use a natural sort 2025-06-25 22:52:38 +02:00
rustc_llvm rustc_llvm: add Windows system libs only when cross-compiling from Windows 2025-05-31 15:47:14 +02:00
rustc_log Add documentation for init_logger_with_additional_layer 2025-06-12 12:11:15 +02:00
rustc_macros Remove doc comments from TyCtxtFeed 2025-07-01 00:14:06 +00:00
rustc_metadata Auto merge of #143013 - bjorn3:split_exported_symbols, r=oli-obk 2025-07-01 11:53:02 +00:00
rustc_middle Rollup merge of #143324 - RalfJung:native-call-prep, r=oli-obk 2025-07-03 05:21:35 +02:00
rustc_mir_build loop match: handle opaque patterns 2025-07-01 15:53:52 +02:00
rustc_mir_dataflow mir: Use the new method for BasicBlockData 2025-06-29 20:39:13 +08:00
rustc_mir_transform Rollup merge of #143273 - 1c3t3a:enum-check-negative, r=SparrowLii 2025-07-03 05:21:32 +02:00
rustc_monomorphize Remove support for dyn* 2025-07-01 19:00:21 +00:00
rustc_next_trait_solver Auto merge of #142974 - cuviper:stage0-bump, r=Mark-Simulacrum 2025-07-02 01:41:18 +00:00
rustc_parse Auto merge of #143338 - matthiaskrgr:rollup-ykaxh04, r=matthiaskrgr 2025-07-02 23:29:03 +00:00
rustc_parse_format update to literal-escaper 0.0.4 for better API without unreachable and faster string parsing 2025-06-23 06:36:22 +00:00
rustc_passes Rollup merge of #143279 - GuillaumeGomez:rm-itemkind-descr, r=oli-obk 2025-07-01 17:47:06 +02:00
rustc_pattern_analysis Add #[loop_match] for improved DFA codegen 2025-06-23 20:43:04 +02:00
rustc_privacy Reorder fields in hir::ItemKind variants. 2025-05-30 02:23:20 +10:00
rustc_proc_macro update to literal-escaper 0.0.4 for better API without unreachable and faster string parsing 2025-06-23 06:36:22 +00:00
rustc_query_impl Add new self-profile event for aggregating query hit counts 2025-06-25 11:09:58 +02:00
rustc_query_system Rollup merge of #142384 - celinval:chores-rayon-mv, r=oli-obk 2025-06-20 23:25:54 -04:00
rustc_resolve Auto merge of #143338 - matthiaskrgr:rollup-ykaxh04, r=matthiaskrgr 2025-07-02 23:29:03 +00:00
rustc_sanitizers Remove support for dyn* 2025-07-01 19:00:21 +00:00
rustc_serialize Update cfg(bootstrap) 2025-07-01 10:55:49 -07:00
rustc_session Rollup merge of #142809 - KMJ-007:ad-type-analysis-flag, r=ZuseZ4 2025-06-25 22:14:55 +02:00
rustc_smir Auto merge of #142974 - cuviper:stage0-bump, r=Mark-Simulacrum 2025-07-02 01:41:18 +00:00
rustc_span Rollup merge of #143070 - joshtriplett:macro-rules-parse, r=petrochenkov 2025-07-02 19:29:37 +02:00
rustc_symbol_mangling Remove support for dyn* 2025-07-01 19:00:21 +00:00
rustc_target Rollup merge of #142321 - ostylk:fix/ppc64_abi, r=workingjubilee 2025-07-02 19:28:05 +02:00
rustc_thread_pool Apply suggestions from code review 2025-06-16 12:27:47 -07:00
rustc_trait_selection Rollup merge of #143235 - compiler-errors:const-item-bound, r=oli-obk 2025-07-02 19:29:37 +02:00
rustc_traits Remove some glob imports from the type system 2025-06-25 15:35:16 +00:00
rustc_transmute tag_for_variant: properly pass TypingEnv 2025-06-27 17:04:33 +02:00
rustc_ty_utils Rollup merge of #143258 - compiler-errors:disambiguator-state, r=oli-obk 2025-07-02 19:28:08 +02:00
rustc_type_ir Auto merge of #142974 - cuviper:stage0-bump, r=Mark-Simulacrum 2025-07-02 01:41:18 +00:00
rustc_type_ir_macros Split TypeFolder and FallibleTypeFolder 2025-04-15 18:30:35 +00:00
stable_mir Change rustc_driver dependency on stable_mir crate 2025-04-30 15:39:52 -07:00