Remove workaround for fixed ICE (#35069)

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-01-19 05:13:17 +01:00 committed by GitHub
parent 748b0974e5
commit 9f4787f006
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
}
}