better error for rustc_strict_coherence misuse

This commit is contained in:
Michael Goulet
2022-10-30 19:10:35 +00:00
parent 5ab74459b8
commit 953727f574
5 changed files with 45 additions and 2 deletions

View File

@@ -55,3 +55,12 @@ pub struct ConstEvalNonIntError {
#[primary_span]
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(middle_strict_coherence_needs_negative_coherence)]
pub(crate) struct StrictCoherenceNeedsNegativeCoherence {
#[primary_span]
pub span: Span,
#[label]
pub attr_span: Option<Span>,
}