Skip to content
New issue

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

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

Already on GitHub? # to your account

fuzz! macro doesn't support mutable bindings #66

Open
cbiffle opened this issue Mar 25, 2022 · 0 comments
Open

fuzz! macro doesn't support mutable bindings #66

cbiffle opened this issue Mar 25, 2022 · 0 comments

Comments

@cbiffle
Copy link

cbiffle commented Mar 25, 2022

Test case resembles:

        fuzz!(|mut data: &[u8]| {
            loop {
                match hubpack::deserialize::<Structy>(data) {
                    Err(_) => break,
                    Ok((_, rest)) => data = rest,
                }
            }
        });

Alas:

28 |         fuzz!(|mut data: &[u8]| {
   |                    ^^^^ no rules expected this token in macro call

I assume the fuzz! macro is currently parsing the closure header too narrowly.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant