From 637ea3f746236611fc5451cfc97c976650c20218 Mon Sep 17 00:00:00 2001 From: Lukas Markeffsky <@> Date: Fri, 21 Jul 2023 22:31:43 +0200 Subject: validate `doc(masked)` --- compiler/rustc_passes/src/errors.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'compiler/rustc_passes/src/errors.rs') diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs index eae13f86049..4f5514372d1 100644 --- a/compiler/rustc_passes/src/errors.rs +++ b/compiler/rustc_passes/src/errors.rs @@ -267,6 +267,25 @@ pub struct DocInlineOnlyUse { pub item_span: Option, } +#[derive(LintDiagnostic)] +#[diag(passes_doc_masked_only_extern_crate)] +#[note] +pub struct DocMaskedOnlyExternCrate { + #[label] + pub attr_span: Span, + #[label(passes_not_an_extern_crate_label)] + pub item_span: Option, +} + +#[derive(LintDiagnostic)] +#[diag(passes_doc_masked_not_extern_crate_self)] +pub struct DocMaskedNotExternCrateSelf { + #[label] + pub attr_span: Span, + #[label(passes_extern_crate_self_label)] + pub item_span: Option, +} + #[derive(Diagnostic)] #[diag(passes_doc_attr_not_crate_level)] pub struct DocAttrNotCrateLevel<'a> { -- cgit 1.4.1-3-g733a5