Don't emit trailing semicolon from bail! - #294
Merged
Manishearth merged 1 commit intoAug 10, 2026
Merged
Conversation
Contributor
Author
|
It looks like the master branch is at the unreleased version 1.0. It would be great if this patch could also be backported to the 0.6 release series (once it has been accepted). |
Using `bail` in expression position (e.g. a match arm) leads to a warning on recent Rust nightlies, which might be turned into an error soon (see rust-lang/rust#159218 ). This commit fixes this by just removing the semicolon on the emitted `return` statement. This is the same fix that was already applied in `anyhow` in dtolnay/anyhow#120
phil-opp
force-pushed
the
remove-trailing-semicolons-from-bail
branch
from
August 9, 2026 10:33
7a6ca01 to
2a86ae8
Compare
Contributor
Author
|
Rebased on top of merged #295 |
sbernauer
added a commit
to sbernauer/breakwater
that referenced
this pull request
Aug 10, 2026
Working around the fact that eyre-rs/eyre#294 isn't merged yet
Manishearth
approved these changes
Aug 10, 2026
Manishearth
left a comment
Contributor
There was a problem hiding this comment.
I'll figure out how to backport.
Contributor
|
This is now in eyre 0.6.13 |
Contributor
Author
|
Thanks a lot! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Using
bailin expression position (e.g. a match arm) leads to a warning on recent Rust nightlies, which might be turned into an error soon (see rust-lang/rust#159218 ).This commit fixes this by just removing the semicolon on the emitted
returnstatement. This is the same fix that was already applied inanyhowin dtolnay/anyhow#120Fixes #293