diff --git a/components/script/build.rs b/components/script/build.rs index c7a905fa832..1635558b4b8 100644 --- a/components/script/build.rs +++ b/components/script/build.rs @@ -58,10 +58,7 @@ struct Bytes<'a>(&'a str); impl FmtConst for Bytes<'_> { fn fmt_const(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - // https://github.com/rust-lang/rust/issues/55223 - // should technically be just `write!(formatter, "b\"{}\"", self.0) - // but the referenced issue breaks promotion in the surrounding code - write!(formatter, "{{ const FOO: &[u8] = b\"{}\"; FOO }}", self.0) + write!(formatter, "b\"{}\"", self.0) } }