diff options
| author | Michael Goulet <michael@errs.io> | 2022-10-30 19:10:35 +0000 | 
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-10-30 19:11:55 +0000 | 
| commit | 953727f57474e540315ef16f11ad7dfafdfd9db9 (patch) | |
| tree | 739023261eec52399ff38e8256f44b9d810cc2c1 /compiler/rustc_middle/src/error.rs | |
| parent | 5ab74459b86465e751fc8f6fa9934687423ce2a6 (diff) | |
| download | rust-953727f57474e540315ef16f11ad7dfafdfd9db9.tar.gz rust-953727f57474e540315ef16f11ad7dfafdfd9db9.zip  | |
better error for rustc_strict_coherence misuse
Diffstat (limited to 'compiler/rustc_middle/src/error.rs')
| -rw-r--r-- | compiler/rustc_middle/src/error.rs | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/error.rs b/compiler/rustc_middle/src/error.rs index a7a7ac0599d..43903e6739f 100644 --- a/compiler/rustc_middle/src/error.rs +++ b/compiler/rustc_middle/src/error.rs @@ -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>, +}  | 
