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
uuid! macro not reporting precise diagnostics #585
Comments
If we bump MSRV to 1.57, we can replace the const_err trick with const panic and provide a more friendly message to tell people what happens. Lines 19 to 26 in a1fd80c
|
I'm very tempted to stabilize on at least 1.56.0 (I've been playing with it in #587 (comment)) so we can bump to the 2021 edition, but at this stage it might be a bit much of a jump for some people. |
I'd like to try figure out the issue with spans before |
It looks like we're not getting precise spans in our
uuid!
macro, because thesubspan
method isn't considering our indexes to be within the span:This might have changed at some point since we first wrote this code. I'm not actually sure how we're meant to be offsetting those subspans, since we can't tell what the real byte offset of a span is.
I'll do some digging and see if I can find out what's going on there. The proc-macro infrastructure is a bit tricky to trace through.
If we disable the
macro-diagnostics
feature then we end up with:I think there's nothing we have to do here and the error is only confusing because of the future-compatibility lint template. If you try parse an invalid UUID then we want your compilation to fail.
The text was updated successfully, but these errors were encountered: