From 755701f4f6a961cc76bdef02a96843727e86dd9a Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Thu, 21 Mar 2024 16:33:06 +0100 Subject: [PATCH] crown: Do not warn about crown for rustdoc or clippy (#31805) Fixes #31804. --- components/script/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/script/lib.rs b/components/script/lib.rs index 69e13da6a04..2bfde9ecde0 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -5,9 +5,11 @@ #![feature(register_tool)] #![deny(unsafe_code)] #![doc = "The script crate contains all matters DOM."] +// Register the linter `crown`, which is the Servo-specific linter for the script +// crate. Issue a warning if `crown` is not being used to compile, but not when +// building rustdoc or running clippy. #![register_tool(crown)] -// Issue a warning if `crown` cannot be found. -#![warn(unknown_lints)] +#![cfg_attr(any(doc, clippy, feature = "cargo-clippy"), allow(unknown_lints))] #![deny(crown_is_not_used)] // These are used a lot so let's keep them for now