Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parse error with non-literal after minus sign #373

Merged
merged 3 commits into from
May 18, 2024
Merged

Fix parse error with non-literal after minus sign #373

merged 3 commits into from
May 18, 2024

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented May 18, 2024

Fixes #372.

dtolnay added 3 commits May 18, 2024 04:32
Currently failing:

    error: unexpected token: `b`
       --> tests/test_ensure.rs:138:44
        |
    138 |     let test = || Ok(ensure!(a <= b || a - b <= 10));
        |                                            ^
        |
       ::: src/ensure.rs:319:117
        |
    319 |     (atom $stack:tt $bail:tt (~$($fuel:tt)*) {($($buf:tt)*) $($parse:tt)*} ($dot:tt $ident:tt $colons:tt $larrow:tt $lit:literal $($dup:tt)*) . $i:ident :: <- $($rest:tt)*) => {
        |                                                                                                                     ------------ while parsing argument for this `literal` macro fragment
@dtolnay dtolnay merged commit 0a1b405 into master May 18, 2024
25 checks passed
@dtolnay dtolnay deleted the minusneg branch May 18, 2024 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot compile when using ensure!
1 participant