Open
Description
Given the following program
fn main() {
let _closure = |x: i32| x+x;
}
I would expect rustc filename.rs -Zdump-mir=all
to dump all stages of the MIR of all functions. What happens instead is that for the closure, only the 000-*
and 001-*
passes are emitted; the 002-*
are missing. That's probably because they are not actually emitted into the binary, so they never get generated. I think that's a bug; one should expect -Zdump-mir
to generate the MIR of all phases of all code.
(I noticed this because I was adding a mir-opt test and it told me it couldn't find the file.)