diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-14 14:13:35 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-15 10:13:12 +1100 |
| commit | 9a7841251115c79fe7e1c12e2e5d637e19ad940a (patch) | |
| tree | 073dcbd11af1207ae334d4dae991f2f4990d4c59 /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | 2c2c7f13a65f22969adf52a8040fb1bed842fb94 (diff) | |
| download | rust-9a7841251115c79fe7e1c12e2e5d637e19ad940a.tar.gz rust-9a7841251115c79fe7e1c12e2e5d637e19ad940a.zip | |
Split `Handler::emit_diagnostic` in two.
Currently, `emit_diagnostic` takes `&mut self`. This commit changes it so `emit_diagnostic` takes `self` and the new `emit_diagnostic_without_consuming` function takes `&mut self`. I find the distinction useful. The former case is much more common, and avoids a bunch of `mut` and `&mut` occurrences. We can also restrict the latter with `pub(crate)` which is nice.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions
