rust/compiler/rustc_mir_transform/src
bors 6b290367ec Auto merge of #113802 - cjgillot:check-debuginfo, r=compiler-errors
Substitute types before checking inlining compatibility.

Addresses https://github.com/rust-lang/rust/issues/112332 and https://github.com/rust-lang/rust/issues/113781

I don't have a minimal test, but I this seems to remove the ICE locally.

This whole pre-inlining validation mirrors the "real" MIR validation pass to verify that inlined MIR will still pass validation.
The debuginfo loop is added because MIR validation check projections in debuginfo.
Likewise, MIR validation only checks `is_subtype`, so there is no reason for a stronger check.

The types were not being substituted in `check_equal`, so we were not bailing out of inlining if the substituted MIR callee body would not pass validation.
2023-07-21 09:14:55 +00:00
..
coverage Auto merge of #113105 - matthiaskrgr:rollup-rci0uym, r=matthiaskrgr 2023-06-27 21:31:47 +00:00
inline refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
abort_unwinding_calls.rs Add UnwindAction::Terminate 2023-04-06 09:34:16 +01:00
add_call_guards.rs Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
add_moves_for_packed_drops.rs Remove DesugaringKind::Replace. 2023-05-25 17:40:46 +00:00
add_retag.rs Adt for Unique may contain a reference 2023-06-20 16:30:44 +02:00
check_alignment.rs Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
check_const_item_mutation.rs Migrate mir_transform to translatable diagnostics 2023-05-02 16:24:18 +01:00
check_packed_ref.rs Migrate mir_transform to translatable diagnostics 2023-05-02 16:24:18 +01:00
check_unsafety.rs Introduce ExtentUnord trait for collections that can safely consume UnordItems. 2023-07-14 10:10:15 +02:00
cleanup_post_borrowck.rs Actually keep PlaceMention if requested. 2023-04-21 21:34:59 +00:00
const_debuginfo.rs Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
const_goto.rs Disable two mir opts that are known to be unsound 2023-06-21 07:41:09 +00:00
const_prop_lint.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
const_prop.rs Inline should_const_prop. 2023-07-20 21:30:51 +00:00
copy_prop.rs Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
ctfe_limit.rs Simplify back-edge logic. 2023-05-17 12:18:55 +00:00
dataflow_const_prop.rs Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
dead_store_elimination.rs Turn copy into moves during DSE. 2023-07-19 09:59:12 +00:00
deduce_param_attrs.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
deduplicate_blocks.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
deref_separator.rs Avoid cloning LocalDecls. 2023-06-29 11:53:41 +10:00
dest_prop.rs Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
dump_mir.rs Write to stdout if - is given as output file 2023-06-06 17:53:29 -04:00
early_otherwise_branch.rs Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
elaborate_box_derefs.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
elaborate_drops.rs Merge un_derefer into MovePathLookup 2023-06-29 22:14:27 -07:00
errors.rs Auto merge of #112017 - Nemo157:unsafe-block-rustfix, r=eholk 2023-06-13 15:57:59 +00:00
ffi_unwind_calls.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
function_item_references.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
generator.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
inline.rs Substitute types before checking compatibility. 2023-07-19 12:38:15 +00:00
instsimplify.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
large_enums.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
lib.rs Perform reference propagation earlier. 2023-07-10 16:01:18 +00:00
lower_intrinsics.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
lower_slice_len.rs Better error for non const PartialEq call generated by match 2023-06-18 05:24:38 +00:00
match_branches.rs Try enabling MatchBranchSimplification 2023-05-27 13:50:13 -04:00
multiple_return_terminators.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
normalize_array_len.rs Rename adjustment::PointerCast and variants using it to PointerCoercion 2023-07-07 18:17:16 +02:00
nrvo.rs Use Option::is_some_and and Result::is_ok_and in the compiler 2023-05-24 14:20:41 +00:00
pass_manager.rs Profile MIR passes. 2023-05-15 20:27:12 +00:00
prettify.rs make reorder BB pass use cached RPO 2023-06-14 20:08:04 +00:00
ref_prop.rs Call super for debuginfo. 2023-07-10 16:01:19 +00:00
remove_noop_landing_pads.rs Rename Abort terminator to Terminate 2023-04-06 09:34:16 +01:00
remove_place_mention.rs Actually keep PlaceMention if requested. 2023-04-21 21:34:59 +00:00
remove_storage_markers.rs Make MIR basic blocks field public 2022-07-07 08:11:49 +02:00
remove_uninit_drops.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
remove_unneeded_drops.rs Make MIR basic blocks field public 2022-07-07 08:11:49 +02:00
remove_zsts.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
required_consts.rs Only rewrite valtree-constants to patterns and keep other constants opaque 2023-05-31 14:02:57 +00:00
reveal_all.rs Also reveal constants before MIR opts. 2023-04-23 10:04:41 +00:00
separate_const_switch.rs Disable two mir opts that are known to be unsound 2023-06-21 07:41:09 +00:00
shim.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
simplify_branches.rs Use param_env_reveal_all_normalized in MIR opts. 2023-04-23 10:04:41 +00:00
simplify_comparison_integral.rs Use param_env_reveal_all_normalized in MIR opts. 2023-04-23 10:04:41 +00:00
simplify.rs Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
sroa.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
ssa.rs Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
uninhabited_enum_branching.rs Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
unreachable_prop.rs Fix typos in compiler 2023-04-10 22:02:52 +02:00