Rename DiagnosticBuilder::handler as DiagnosticBuilder::dcx.

This commit is contained in:
Nicholas Nethercote 2023-12-18 13:35:22 +11:00
parent d1d0896c40
commit 9f3f1ca8c4
2 changed files with 2 additions and 2 deletions

View file

@ -184,7 +184,7 @@ pub(crate) struct UnsafeOpInUnsafeFn {
impl<'a> DecorateLint<'a, ()> for UnsafeOpInUnsafeFn {
#[track_caller]
fn decorate_lint<'b>(self, diag: &'b mut DiagnosticBuilder<'a, ()>) {
let handler = diag.handler().expect("lint should not yet be emitted");
let handler = diag.dcx().expect("lint should not yet be emitted");
let desc = handler.eagerly_translate_to_string(self.details.label(), [].into_iter());
diag.set_arg("details", desc);
diag.span_label(self.details.span, self.details.label());