From 280bd6ab151d592978bf637815dca947e0b29191 Mon Sep 17 00:00:00 2001 From: George Pollard Date: Thu, 8 Aug 2024 21:18:40 +1200 Subject: [PATCH] Fix build on 1.70 --- tests/graphical.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/graphical.rs b/tests/graphical.rs index 42ed7a6..3176812 100644 --- a/tests/graphical.rs +++ b/tests/graphical.rs @@ -2440,9 +2440,10 @@ fn at_invalid_unicode() -> Result<(), MietteError> { // 3 bytes here are mapped to 1 char when replaced by replacement character // this tests that the line pointing from the label is the correct length when rendered // - it should be 1 char wide not 3 chars - let invalid_source = b"malformed h\xf0\x93\x8aXYZ"; + let invalid_source: &[u8] = b"malformed h\xf0\x93\x8aXYZ"; - #[allow(invalid_from_utf8)] + // invalid utf8 lint only available from 1.72 + #[allow(unknown_lints, invalid_from_utf8)] let utf8_err = std::str::from_utf8(invalid_source).unwrap_err(); // make err pointing at the invalid part