False double-borrow and/or ICE in macro expansion (only with macro arguments) #7971
Labels
A-lifetimes
Area: Lifetimes / regions
A-syntaxext
Area: Syntax extensions
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Error:
If the macro is written with no arguments, or if the argument is not used in the expansion, then the error goes away. I believe the double-borrow error is because the borrow-checker tracks on a line-granularity instead of an expression-granularity, but I've no idea why the arguments affect it.
Here is a variation that causes an ICE instead:
The ICE error, with an old build of rustc, is:
and with a new (today) build, is:
The text was updated successfully, but these errors were encountered: