Open RalfJung opened 1 month ago
--emit=metadata
without other --emit
flags has a lot of special behavior. For example it omits MIR for any non-const function from the generated crate metadata, even when said MIR would be necessary for codegen in downstream crates.
I tried this code
with
rustc +nightly --emit=mir become.rs
I expect this to just produce MIR. Instead, it ICEs:This is very strange since the codegen backend should not even be invoked here -- I asked only for MIR, not for LLVM IR or a compiled binary.
--emit=metadata
succeeds, so rustc is able to not call codegen... it just strangely decides to call codegen with--emit=mir
, it seems?