From 338dcc017edba06f3d4bd508884ac8c5b2e5b796 Mon Sep 17 00:00:00 2001 From: jedel1043 Date: Thu, 28 Sep 2023 00:05:34 -0600 Subject: [PATCH] Allow unused static strings --- boa_engine/src/string/common.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boa_engine/src/string/common.rs b/boa_engine/src/string/common.rs index 7c7977b771d..1b49483f4c0 100644 --- a/boa_engine/src/string/common.rs +++ b/boa_engine/src/string/common.rs @@ -12,6 +12,7 @@ macro_rules! well_known_statics { $( paste!{ #[doc = "Gets the static `JsString` for `\"" $string "\"`."] + #[allow(unused)] pub(crate) const $name: JsString = JsString { ptr: Tagged::from_tag( Self::find_index(utf16!($string)), @@ -76,6 +77,7 @@ impl StaticJsStrings { RAW_STATICS.get(index).copied() } + // Some consts are only used on certain features, which triggers the unused lint. well_known_statics! { (EMPTY_STRING, ""), // Symbols