1
Fork 0
rust/compiler
Matthias Krüger 1c51e5b110
Rollup merge of #129711 - lqd:nll-mir-dumps, r=compiler-errors
Expand NLL MIR dumps

This PR is a first step to clean up and expand NLL MIR dumps:
- by restoring the "mir-include-spans" comments which are useful for `-Zdump-mir=nll`
- by adding the list of borrows to NLL MIR dumps, where they are introduced in the CFG and in which region

Comments in MIR dumps were turned off in #112346, but as shown in #114652 they were still useful for us working with NLL MIR dumps. So this PR pulls `-Z mir-include-spans` into its own options struct, so that passes dumping MIR can override them if need be. The rest of the compiler is not affected, only the "nll" pass dumps have these comments enabled again. The CLI still has priority when specifying the flag, so that we can explicitly turn them off in the `mir-opt` tests to keep blessed dumps easier to work with (which was one of the points of #112346).

Then, as part of a couple steps to improve NLL/polonius MIR dumps and `.dot` visualizations, I've also added the list of borrows and where they're introduced. I'm doing all this to help debug some polonius scope issues in my prototype location-sensitive analysis :3. I'll probably add member constraints soon.
2024-08-31 14:46:07 +02:00
..
rustc Link std statically in rustc_driver 2024-08-11 04:16:53 +02:00
rustc_abi ABI compat check: detect unadjusted ABI mismatches 2024-08-27 09:04:59 +02:00
rustc_arena compiler: Remove feature(new_uninit) 2024-08-27 10:17:05 -07:00
rustc_ast Rollup merge of #120221 - compiler-errors:statements-are-not-patterns, r=nnethercote 2024-08-31 10:08:51 +02:00
rustc_ast_ir Add warn(unreachable_pub) to several crates. 2024-08-16 08:46:13 +10:00
rustc_ast_lowering fmt-debug option 2024-08-28 23:32:40 +01:00
rustc_ast_passes Rollup merge of #126013 - nnethercote:unreachable_pub, r=Urgau 2024-08-27 00:41:57 +02:00
rustc_ast_pretty Add warn(unreachable_pub) to rustc_ast_pretty. 2024-08-16 08:46:46 +10:00
rustc_attr Rollup merge of #126013 - nnethercote:unreachable_pub, r=Urgau 2024-08-27 00:41:57 +02:00
rustc_baked_icu_data Don't add warn(unreachable_pub) to rustc_baked_icu. 2024-08-16 08:46:52 +10:00
rustc_borrowck add borrows to NLL MIR dumps 2024-08-30 07:14:31 +00:00
rustc_builtin_macros Rollup merge of #123940 - kornelski:remove-derived-debug, r=Urgau 2024-08-29 16:21:46 +02:00
rustc_codegen_cranelift introduce PrettyPrintMirOptions for cosmetic MIR dump options 2024-08-30 07:07:28 +00:00
rustc_codegen_gcc Rollup merge of #128731 - RalfJung:simd-shuffle-vector, r=workingjubilee 2024-08-27 01:46:50 -05:00
rustc_codegen_llvm Rollup merge of #128970 - DianQK:lint-llvm-ir, r=nikic 2024-08-29 16:21:47 +02:00
rustc_codegen_ssa Rollup merge of #129366 - petrochenkov:libsearch, r=jieyouxu 2024-08-31 10:08:53 +02:00
rustc_const_eval Rollup merge of #129659 - RalfJung:const-fn-lang-feat, r=fee1-dead 2024-08-31 14:46:06 +02:00
rustc_data_structures Update indexmap and use IndexMap::append 2024-08-13 16:16:57 -07:00
rustc_driver
rustc_driver_impl Rollup merge of #129667 - dev-ardi:rustc_driver-cleanup, r=michaelwoerister 2024-08-28 17:12:19 +02:00
rustc_error_codes Add warn(unreachable_pub) to rustc_error_codes. 2024-08-27 11:49:59 +10:00
rustc_error_messages Add warn(unreachable_pub) to rustc_error_messages. 2024-08-27 11:52:08 +10:00
rustc_errors Add warn(unreachable_pub) to rustc_errors. 2024-08-27 12:03:37 +10:00
rustc_expand Add warn(unreachable_pub) to rustc_expand. 2024-08-27 12:40:38 +10:00
rustc_feature Rollup merge of #123940 - kornelski:remove-derived-debug, r=Urgau 2024-08-29 16:21:46 +02:00
rustc_fluent_macro Add warn(unreachable_pub) to rustc_fluent_macro. 2024-08-27 12:56:54 +10:00
rustc_fs_util Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_graphviz Add warn(unreachable_pub) to rustc_graphviz. 2024-08-27 12:58:29 +10:00
rustc_hir Implement RFC 3525. 2024-08-28 09:54:23 +02:00
rustc_hir_analysis Stop using ty::GenericPredicates for non-predicates_of queries 2024-08-29 00:17:40 -04:00
rustc_hir_pretty Add warn(unreachable_pub) to rustc_hir_pretty. 2024-08-27 13:25:40 +10:00
rustc_hir_typeck Rollup merge of #129725 - compiler-errors:predicates-of, r=fmease 2024-08-31 10:08:57 +02:00
rustc_incremental Add warn(unreachable_pub) to rustc_incremental. 2024-08-27 14:30:20 +10:00
rustc_index Rollup merge of #129401 - workingjubilee:partial-initialization-of-stabilization, r=dtolnay,joboet 2024-08-28 19:12:52 -07:00
rustc_index_macros
rustc_infer Stop using ty::GenericPredicates for non-predicates_of queries 2024-08-29 00:17:40 -04:00
rustc_interface make -Z mir-include-spans a dedicated enum 2024-08-30 07:14:19 +00:00
rustc_lexer Add warn(unreachable_pub) to rustc_lexer. 2024-08-27 15:12:46 +10:00
rustc_lint Rollup merge of #129725 - compiler-errors:predicates-of, r=fmease 2024-08-31 10:08:57 +02:00
rustc_lint_defs Rollup merge of #129534 - workingjubilee:ratchet-wasm-c-abi-fcw-to-deny, r=daxpedda,alexcrichton 2024-08-31 10:08:54 +02:00
rustc_llvm Rollup merge of #128970 - DianQK:lint-llvm-ir, r=nikic 2024-08-29 16:21:47 +02:00
rustc_log Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_macros Add warn(unreachable_pub) to rustc_metadata. 2024-08-29 20:13:06 +10:00
rustc_metadata Rollup merge of #129725 - compiler-errors:predicates-of, r=fmease 2024-08-31 10:08:57 +02:00
rustc_middle Rollup merge of #129711 - lqd:nll-mir-dumps, r=compiler-errors 2024-08-31 14:46:07 +02:00
rustc_mir_build Add warn(unreachable_pub) to rustc_mir_build. 2024-08-29 20:13:06 +10:00
rustc_mir_dataflow Add warn(unreachable_pub) to rustc_mir_dataflow. 2024-08-29 20:13:06 +10:00
rustc_mir_transform Rollup merge of #129724 - nnethercote:rm-Option-bang, r=fee1-dead 2024-08-31 10:08:56 +02:00
rustc_monomorphize Add warn(unreachable_pub) to rustc_monomorphize. 2024-08-29 20:13:06 +10:00
rustc_next_trait_solver Add warn(unreachable_pub) to rustc_next_trait_solver. 2024-08-29 20:13:06 +10:00
rustc_parse Rollup merge of #120221 - compiler-errors:statements-are-not-patterns, r=nnethercote 2024-08-31 10:08:51 +02:00
rustc_parse_format Add warn(unreachable_pub) to rustc_parse_format. 2024-08-29 20:13:06 +10:00
rustc_passes Add warn(unreachable_pub) to rustc_passes. 2024-08-29 20:18:40 +10:00
rustc_pattern_analysis Add warn(unreachable_pub) to rustc_pattern_analysis. 2024-08-29 20:18:44 +10:00
rustc_privacy Add warn(unreachable_pub) to rustc_privacy. 2024-08-29 20:18:44 +10:00
rustc_query_impl Add warn(unreachable_pub) to rustc_query_impl. 2024-08-29 20:18:44 +10:00
rustc_query_system Add warn(unreachable_pub) to rustc_query_system. 2024-08-29 20:18:44 +10:00
rustc_resolve Add warn(unreachable_pub) to rustc_resolve. 2024-08-29 20:18:44 +10:00
rustc_sanitizers Rollup merge of #129345 - compiler-errors:scratch4, r=jieyouxu 2024-08-21 18:15:06 +02:00
rustc_serialize Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_session make -Z mir-include-spans a dedicated enum 2024-08-30 07:14:19 +00:00
rustc_smir Stop using a special inner body for the coroutine by-move body for async closures 2024-08-26 18:44:19 -04:00
rustc_span Rollup merge of #123940 - kornelski:remove-derived-debug, r=Urgau 2024-08-29 16:21:46 +02:00
rustc_symbol_mangling Stop using a special inner body for the coroutine by-move body for async closures 2024-08-26 18:44:19 -04:00
rustc_target riscv64imac: allow shadow call stack sanitizer 2024-08-29 21:48:48 +08:00
rustc_trait_selection Rollup merge of #129725 - compiler-errors:predicates-of, r=fmease 2024-08-31 10:08:57 +02:00
rustc_traits Remove redundant type ops 2024-08-14 14:18:17 -04:00
rustc_transmute Removes dead code from the compiler 2024-08-25 13:41:39 +08:00
rustc_ty_utils Auto merge of #128506 - compiler-errors:by-move-body, r=cjgillot 2024-08-27 23:30:24 +00:00
rustc_type_ir Rollup merge of #129527 - compiler-errors:lint-nit, r=Nadrieril 2024-08-31 10:08:53 +02:00
rustc_type_ir_macros Reformat use declarations. 2024-07-29 08:26:52 +10:00
stable_mir Introduce methods for obtaining Location for statements and terminators 2024-08-23 12:45:38 -04:00