Skip to content

Commit

Permalink
Rollup merge of #122503 - compiler-errors:trait-alias-wf, r=Nilstrieb
Browse files Browse the repository at this point in the history
Make `SubdiagMessageOp` well-formed

`WF(Diag<'_, G>)` requires `G: EmissionGuarantee`, but we don't currently check this is true due to limitations in the solver. Probably still worth enforcing.

r? `@nnethercote` (or anyone can r+ this, really)
  • Loading branch information
matthiaskrgr authored Mar 14, 2024
2 parents 6366c64 + 6e4cd8b commit 6ce3110
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_errors/src/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ where
);
}

pub trait SubdiagMessageOp<G> = Fn(&mut Diag<'_, G>, SubdiagMessage) -> SubdiagMessage;
pub trait SubdiagMessageOp<G: EmissionGuarantee> =
Fn(&mut Diag<'_, G>, SubdiagMessage) -> SubdiagMessage;

/// Trait implemented by lint types. This should not be implemented manually. Instead, use
/// `#[derive(LintDiagnostic)]` -- see [rustc_macros::LintDiagnostic].
Expand Down

0 comments on commit 6ce3110

Please sign in to comment.