Closed
Description
When build with cargo check
we only create crate metadata, which is enough to compile downstream crates. Crate metadata contains the MIR of many items. Usually, this MIR is optimized before being stored in metadata. For cargo check
this doesn't make sense though because the MIR is only used for analysis, never for codegen. Let's not do this unnecessary work.