Files
rust/compiler/rustc_codegen_ssa
Jonathan Brouwer 82ffd1cc73 Rollup merge of #162453 - nnethercote:min-DiagCtxt-methods, r=oli-obk
Minimize `DiagCtxt` methods

We have `DiagCtxt`, `DiagCtxtInner`, and `DiagCtxtHandle`. They're all necessary, but the method placement is inconsistent. This commit establishes a clearer rule: methods should *not* go on `DiagCtxt` whenever possible.

Benefits:

- Simpler rule for deciding where to put a method.

- `impl Deref for DiagCtxtHandle` can be removed, including its non-standard double-reference `&&'a DiagCtxt` return value. This makes it impossible to accidentally discard a taint target by calling `handle` on a `DiagCtxtHandle`.

- Catches some places where we were calling `dcx.handle()` when `dcx` was already a handle.

r? @oli-obk
2026-09-09 15:01:30 +02:00
..
2026-08-31 20:48:05 +02:00
…

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