Make #[repr(Rust)] and #[repr(C)] incompatible with one another

This commit is contained in:
León Orell Valerian Liehr
2023-10-17 03:06:52 +02:00
parent 1bc0463b18
commit d0b99e3efe
4 changed files with 80 additions and 4 deletions

View File

@@ -558,9 +558,16 @@ pub struct ReprIdent {
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(passes_repr_conflicting, code = "E0566")]
pub struct ReprConflicting {
#[primary_span]
pub hint_spans: Vec<Span>,
}
#[derive(LintDiagnostic)]
#[diag(passes_repr_conflicting, code = "E0566")]
pub struct ReprConflicting;
pub struct ReprConflictingLint;
#[derive(Diagnostic)]
#[diag(passes_used_static)]