From 5d26145dee8c58cf3b973a8337d6b771f5f66cd8 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Tue, 27 Oct 2020 14:48:29 -0400 Subject: [PATCH] Remove semicolon from internal `err` macro This macro is used in expression position (a match arm), and only compiles because of #33953 Regardless of what happens with that issue, this makes the usage of the macro less confusing at the call site. --- library/core/src/str/validations.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/str/validations.rs b/library/core/src/str/validations.rs index 10cf1e172e6e4..373a8212425ac 100644 --- a/library/core/src/str/validations.rs +++ b/library/core/src/str/validations.rs @@ -125,7 +125,7 @@ pub(super) fn run_utf8_validation(v: &[u8]) -> Result<(), Utf8Error> { let old_offset = index; macro_rules! err { ($error_len: expr) => { - return Err(Utf8Error { valid_up_to: old_offset, error_len: $error_len }); + return Err(Utf8Error { valid_up_to: old_offset, error_len: $error_len }) }; }