was working perfectly to generate branches of a match statement. However, since last night, if val = -1i32, then this fails with: "error: unexpected token: -1i32". It works fine if val is positive.
I can work around this by avoiding explicitly mentioning the constant -1:
quote_tokens!(ctxt, x if x == ($scope :: $tok as i32) => $scope :: $tok,)
Oh, I think I found it… Contrary to what I thought, the compiler did in fact create signed ast literals… the circumstances are confusing to me, but apparently it did in matches, but only if those matches were created by quote_tokens.