Adjust formatting macro usage for compatibility with future Rust compiler versions #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! This project turned up when assessing the impact of an upcoming Rust compiler bugfix, rust-lang/rust#145838. Currently, formatting macros can cause borrowed temporaries within block tail expressions within their arguments to live longer than they normally would in Rust 20241. Unfortunately, fixing that inconsistency is a breaking change and this project no longer compiles as-is after the fix. This PR implements a minimal change to address the future error.
For reference, here's the build failure log: https://crater-reports.s3.amazonaws.com/pr-145838/try%23b83b707f97d809763b7861afa7638871f3339a33/gh/musicodeXQQ.updownserv/log.txt
Footnotes
See https://doc.rust-lang.org/edition-guide/rust-2024/temporary-tail-expr-scope.html for further details on the expected temporary scope of block tail expressions. ↩