rust/compiler/rustc_middle
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
..
src Rollup merge of #129711 - lqd:nll-mir-dumps, r=compiler-errors 2024-08-31 14:46:07 +02:00
Cargo.toml Auto merge of #127042 - GrigorenkoPV:derivative, r=compiler-errors 2024-07-25 22:50:58 +00:00
messages.ftl Re-implement a type-size based limit 2024-07-02 15:48:48 -04:00
README.md

For more information about how rustc works, see the rustc dev guide.