rust/compiler
Matthias Krüger 050e0cc6eb
Rollup merge of #134314 - compiler-errors:default-struct-value-const, r=estebank
Make sure to use normalized ty for unevaluated const in default struct value

This cleans up the way that we construct the `mir::Const::Unevaluated` for default struct values. We were previously using `from_unevaluated`, which doesn't normalize the type, and is really only used for inline assembly. Other codepaths (such as `ExprKind::NamedConst`) use the type from the body.

Also, let's stop using `literal_operand`, which also is really not meant for calls other than for literal comparisons in pattern lowering.

Also move all of the tests to a separate subdirectory so they don't need to have the same prefix on all the test files.

Fixes #134298
r? estebank or reassign
2024-12-16 08:03:32 +01:00
..
rustc
rustc_abi
rustc_arena
rustc_ast Remove some leftover dead code 2024-12-15 19:18:46 +01:00
rustc_ast_ir
rustc_ast_lowering Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_ast_passes Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_ast_pretty Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_attr Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_baked_icu_data
rustc_borrowck Rollup merge of #134315 - lqd:polonius-next-episode-1, r=jackh726 2024-12-15 20:01:40 +11:00
rustc_builtin_macros
rustc_codegen_cranelift
rustc_codegen_gcc
rustc_codegen_llvm Auto merge of #133417 - RalfJung:aarch64-float-abi, r=workingjubilee 2024-12-15 16:32:03 +00:00
rustc_codegen_ssa Auto merge of #131808 - jdonszelmann:hir-attributes, r=oli-obk,petrochenkov 2024-12-15 22:05:33 +00:00
rustc_const_eval
rustc_data_structures
rustc_driver
rustc_driver_impl
rustc_error_codes
rustc_error_messages
rustc_errors
rustc_expand Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_feature
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_hir_analysis
rustc_hir_pretty Remove some leftover dead code 2024-12-15 19:18:46 +01:00
rustc_hir_typeck
rustc_incremental Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_index
rustc_index_macros
rustc_infer
rustc_interface
rustc_lexer
rustc_lint Auto merge of #131808 - jdonszelmann:hir-attributes, r=oli-obk,petrochenkov 2024-12-15 22:05:33 +00:00
rustc_lint_defs Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_llvm
rustc_log
rustc_macros
rustc_metadata Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_middle Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_mir_build Rollup merge of #134314 - compiler-errors:default-struct-value-const, r=estebank 2024-12-16 08:03:32 +01:00
rustc_mir_dataflow
rustc_mir_transform
rustc_monomorphize
rustc_next_trait_solver
rustc_parse Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_parse_format
rustc_passes Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_pattern_analysis
rustc_privacy
rustc_query_impl
rustc_query_system Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_resolve Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_sanitizers
rustc_serialize
rustc_session
rustc_smir Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_span Rollup merge of #134329 - taiki-e:m68k-target-feature, r=workingjubilee 2024-12-16 01:52:22 +08:00
rustc_symbol_mangling
rustc_target Auto merge of #134349 - jieyouxu:rollup-zqn0jox, r=jieyouxu 2024-12-15 19:14:24 +00:00
rustc_trait_selection Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustc_traits
rustc_transmute
rustc_ty_utils
rustc_type_ir
rustc_type_ir_macros
stable_mir