rust/compiler/rustc_codegen_ssa
Nicholas Nethercote d9508a1fd2 Make Emitter::emit_diagnostic consuming.
All the other `emit`/`emit_diagnostic` methods were recently made
consuming (e.g. #119606), but this one wasn't. But it makes sense to.

Much of this is straightforward, and lots of `clone` calls are avoided.
There are a couple of tricky bits.
- `Emitter::primary_span_formatted` no longer takes a `Diagnostic` and
  returns a pair. Instead it takes the two fields from `Diagnostic` that
  it used (`span` and `suggestions`) as `&mut`, and modifies them. This
  is necessary to avoid the cloning of `diag.children` in two emitters.
- `from_errors_diagnostic` is rearranged so various uses of `diag` occur
  before the consuming `emit_diagnostic` call.
2024-02-05 21:27:01 +11:00
..
src Make Emitter::emit_diagnostic consuming. 2024-02-05 21:27:01 +11:00
Cargo.toml Update to bitflags 2 in the compiler 2023-12-30 18:17:28 +01:00
messages.ftl Correct the anchor of an URL in an error message 2024-01-22 01:02:20 +09:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03:00

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.