Skip to content

Commit

Permalink
Rename __diagnostic_handler_sess as _sess.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Dec 18, 2023
1 parent e97d353 commit 4dc7fab
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions compiler/rustc_macros/src/diagnostics/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,19 @@ impl<'a> DiagnosticDerive<'a> {

let DiagnosticDeriveKind::Diagnostic { dcx } = &builder.kind else { unreachable!() };

// A lifetime of `'a` causes conflicts, but `_sess` is fine.
let mut imp = structure.gen_impl(quote! {
gen impl<'__diagnostic_handler_sess, G>
rustc_errors::IntoDiagnostic<'__diagnostic_handler_sess, G>
gen impl<'_sess, G>
rustc_errors::IntoDiagnostic<'_sess, G>
for @Self
where G: rustc_errors::EmissionGuarantee
{

#[track_caller]
fn into_diagnostic(
self,
#dcx: &'__diagnostic_handler_sess rustc_errors::DiagCtxt
) -> rustc_errors::DiagnosticBuilder<'__diagnostic_handler_sess, G> {
#dcx: &'_sess rustc_errors::DiagCtxt
) -> rustc_errors::DiagnosticBuilder<'_sess, G> {
use rustc_errors::IntoDiagnosticArg;
#implementation
}
Expand Down

0 comments on commit 4dc7fab

Please sign in to comment.