From 5d26145dee8c58cf3b973a8337d6b771f5f66cd8 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Tue, 27 Oct 2020 14:48:29 -0400 Subject: [PATCH 1/2] 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 10cf1e172e6..373a8212425 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 }) }; } From b03d4b0ee93599e02673f5fdd6323734485ca25a Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Wed, 18 Nov 2020 23:11:38 -0500 Subject: [PATCH 2/2] Bump stage0 rustfmt to nightly-2020-11-19 This pulls in https://github.com/rust-lang/rustfmt/pull/4507, allowing us to remove a semicolon in an internal libstd macro --- src/stage0.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stage0.txt b/src/stage0.txt index dae9d219b7b..5b04e0a4985 100644 --- a/src/stage0.txt +++ b/src/stage0.txt @@ -19,7 +19,7 @@ rustc: beta # bootstrapping issues with use of new syntax in this repo. If you're looking at # the beta/stable branch, this key should be omitted, as we don't want to depend # on rustfmt from nightly there. -rustfmt: nightly-2020-10-12 +rustfmt: nightly-2020-11-19 # When making a stable release the process currently looks like: #