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

Add a cap on ensure macro recursion depth #194

Merged
merged 2 commits into from Nov 22, 2021
Merged

Add a cap on ensure macro recursion depth #194

merged 2 commits into from Nov 22, 2021

Commits on Nov 22, 2021

  1. Add test of recursion limit

    Currently fails:
    
        error: recursion limit reached while expanding `$crate::__parse_ensure!`
          --> tests/test_ensure.rs:50:22
           |
        50 |       let test = || Ok(ensure!(
           |  ______________________^
        51 | |         false | false | false | false | false | false | false | false | false |
        52 | |         false | false | false | false | false | false | false | false | false |
        53 | |         false | false | false | false | false | false | false | false | false |
        ...  |
        57 | |         false | false | false | false | false | false | false | false | false
        58 | |     ));
           | |_____^
           |
           = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`test_ensure`)
           = note: this error originates in the macro `$crate::__parse_ensure` (in Nightly builds, run with -Z macro-backtrace for more info)
    dtolnay committed Nov 22, 2021
    Copy the full SHA
    9bed4b5 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    113e0bc View commit details
    Browse the repository at this point in the history