Fix invalid interpolation in error message.

This commit is contained in:
KtorZ 2024-09-07 18:23:35 +02:00
parent b7ea6ea391
commit 943d90a99e
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
1 changed files with 1 additions and 1 deletions

View File

@ -1813,7 +1813,7 @@ pub enum Warning {
.if_supports_color(Stderr, |s| s.bold()), .if_supports_color(Stderr, |s| s.bold()),
literal_foo = "\"foo\"".if_supports_color(Stderr, |s| s.purple()), literal_foo = "\"foo\"".if_supports_color(Stderr, |s| s.purple()),
foo_bytes = "#[102, 111, 111]".if_supports_color(Stderr, |s| s.purple()), foo_bytes = "#[102, 111, 111]".if_supports_color(Stderr, |s| s.purple()),
value = "\"{value}\"".if_supports_color(Stderr, |s| s.purple()), value = format!("\"{value}\"").if_supports_color(Stderr, |s| s.purple()),
symbol_hash = "#".if_supports_color(Stderr, |s| s.purple()), symbol_hash = "#".if_supports_color(Stderr, |s| s.purple()),
}))] }))]
#[diagnostic(code("syntax::bytearray_literal_is_hex_string"))] #[diagnostic(code("syntax::bytearray_literal_is_hex_string"))]