rust/compiler/rustc_codegen_ssa/src/back
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
..
rpath Handle non-utf8 rpaths (fix FIXME) 2023-08-03 20:04:18 +02:00
archive.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
command.rs Reduce usage of Symbol in the linker code 2022-06-28 18:38:36 +00:00
link.rs add missing potential_query_instability for keys and values in hashmap 2024-01-30 12:43:10 +08:00
linker.rs linker: Cleanup implementations of link_staticlib_* 2024-01-24 01:51:43 +03:00
lto.rs Merge new_metadata into codegen_allocator 2022-04-30 21:20:08 +02:00
metadata.rs Address comment 2023-12-18 09:41:36 +08:00
mod.rs Use the object crate for metadata reading 2021-05-07 18:48:58 +02:00
rpath.rs rustc_codegen_ssa: use try_canonicalize in rpath 2023-10-06 09:54:11 -04:00
symbol_export.rs Auto merge of #119409 - Kobzol:rustc-codegen-ssa-query-instability, r=Nilstrieb 2024-01-13 18:07:59 +00:00
write.rs Make Emitter::emit_diagnostic consuming. 2024-02-05 21:27:01 +11:00