diff --git a/components/script/lib.rs b/components/script/lib.rs index 06fad98cb6d..742f952d9d6 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -5,12 +5,8 @@ #![cfg_attr(crown, 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 the linter `crown`, which is the Servo-specific linter for the script crate. #![cfg_attr(crown, register_tool(crown))] -#![cfg_attr(any(doc, clippy), allow(unknown_lints))] -#![deny(crown_is_not_used)] // These are used a lot so let's keep them for now #[macro_use] diff --git a/components/script_bindings/lib.rs b/components/script_bindings/lib.rs index 83dc9fbd1c8..acd0e1978d2 100644 --- a/components/script_bindings/lib.rs +++ b/components/script_bindings/lib.rs @@ -3,12 +3,8 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![cfg_attr(crown, feature(register_tool))] -// 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 the linter `crown`, which is the Servo-specific linter for the script crate. #![cfg_attr(crown, register_tool(crown))] -#![cfg_attr(any(doc, clippy), allow(unknown_lints))] -#![deny(crown_is_not_used)] #[macro_use] extern crate js; diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 606df374d8b..4214fdc225e 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -146,8 +146,9 @@ class MachCommands(CommandBase): # Gather Cargo build timings (https://doc.rust-lang.org/cargo/reference/timings.html). opts = ["--timings"] + opts + crown_enabled = "enabled" if kwargs.get("use_crown", False) else "disabled (no JS garbage collection linting)" + print(f"Building `{build_type.directory_name()}` build with crown {crown_enabled}.") if very_verbose: - print(["Calling", "cargo", "build"] + opts) for key in env: print((key, env[key])) diff --git a/support/crown/src/crown_is_not_used.rs b/support/crown/src/crown_is_not_used.rs deleted file mode 100644 index 58515d6ed43..00000000000 --- a/support/crown/src/crown_is_not_used.rs +++ /dev/null @@ -1,16 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -use rustc_lint::LintStore; -use rustc_session::declare_lint; - -declare_lint! { - CROWN_IS_NOT_USED, - Deny, - "Issues a rustc warning if crown is not used in compilation" -} - -pub fn register(lint_store: &mut LintStore) { - lint_store.register_lints(&[CROWN_IS_NOT_USED]); -} diff --git a/support/crown/src/main.rs b/support/crown/src/main.rs index 7c70f45463b..b4d530a34ef 100644 --- a/support/crown/src/main.rs +++ b/support/crown/src/main.rs @@ -35,8 +35,6 @@ mod unrooted_must_root; #[cfg(feature = "trace_in_no_trace_lint")] mod trace_in_no_trace; -mod crown_is_not_used; - struct MyCallbacks; impl Callbacks for MyCallbacks { @@ -51,7 +49,6 @@ impl Callbacks for MyCallbacks { return; } - crown_is_not_used::register(lint_store); #[cfg(feature = "unrooted_must_root_lint")] unrooted_must_root::register(lint_store); #[cfg(feature = "trace_in_no_trace_lint")]