Fix parse errors - #202
Open
Marsman1996 wants to merge 4 commits into
Open
Fix parse errors#202Marsman1996 wants to merge 4 commits into
Marsman1996 wants to merge 4 commits into
Conversation
Marsman1996
force-pushed
the
fix-parse-error
branch
from
May 31, 2026 03:07
a39f275 to
c526b1d
Compare
Contributor
Author
Block Expression MethodPoCverus! {
fn test() {
{#[verus_spec(with => tracked_state)] acquire_lock()}.then(|| true)
}
}Error MessageFormatted Code after Fixingverus! {
fn test() {
{
#[verus_spec(with => tracked_state)]
acquire_lock()
}.then(|| true)
}
} // verus!I initially considered following rustfmt's behavior, which formats: fn test() {
{#[verus_spec(with => tracked_state)] acquire_lock()}.then(|| true)
}into fn test() {
{
#[verus_spec(with => tracked_state)]
acquire_lock()
}
.then(|| true)
}However, supporting this formatting style would require additional parsing logic and significantly more time. |
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.
While formatting VOSTD code, we found several parse errors.
This PR fixes the following cases:
returnsclause with a struct literalreturns_clausePoC
Error Message
Record Field
PoC
Error Message
Commented-Out Generic Type Bound
PoC
Error Message
Formatted Code after Fixing
I refer to the behavior of rustfmt, which will format
into
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.