Open djc opened 3 years ago
Could you please provide a complete program? Mut bindings should have no impact on quickcheck.
(Edited my example -- I just meant the mut binding for the function argument, plus the workaround for it.)
It's here: https://github.com/10XGenomics/rust-boomphf/blob/master/src/lib.rs#L802
(Was looking at it because it started failing after upgrading from 0.9 to 0.10, https://github.com/10XGenomics/rust-boomphf/pull/19.)
Okay, so you're talking about the macro. That wasn't at all clear.
And you're also reporting this as a regression? I don't think there were any changes to the macro.
I don't know when I'll be able to look into this, sorry. The quickcheck macro is not something that I understand well. A minimal reproduction would help.
I'm not reporting this as a regression -- the breakage is unrelated to this bug report.
I think the problem is basically in https://github.com/BurntSushi/quickcheck/blob/master/src/lib.rs#L48. The macro takes fn $fn_name:ident($($arg_name:ident : $arg_ty:ty),*) -> $ret:ty
, which is constrained to only taking ident: ty
for each argument, which doesn't cover the additional mut keyword.
Okay, I'll mark this as an enhancement. My recollection is that the macro is quite gnarly, so anyone who likes playing in macro_rulea muck is invited to take a look at this. :)
I noticed that this works:
but this doesn't:
Error: