mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-06 01:38:35 +00:00
It's a trait that is used to give `Diag::emit` different return types depending on the `G` in `Diag<'_, G>`. It works, but it's overkill. There are only four different `G` types in practice (`BugAbort`, `FatalAbort`, `ErrorGuaranteed`, and `()`) and having inherent `emit` methods for each of those four concrete `Diag<'_, G>` types is good enough. This commit makes that change. This removes `EmissionGuarantee` trait bounds from many places, which is nice.
The codegen crate contains the code to convert from MIR into LLVM IR,
and then from LLVM IR into machine code. In general it contains code
that runs towards the end of the compilation process.
For more information about how codegen works, see the rustc dev guide.