-
Notifications
You must be signed in to change notification settings - Fork 108
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
Fix zerocopy-derive hygiene on Rust 1.58 and below #847
Comments
This isn't a hygiene issue, since it doesn't relate to how our derive captures names. Rather, it relates to a limitation of Rust's priv-in-pub checker being lifted in 1.59 because of rust-lang/rust#90586. Disabling the test on versions below 1.59 is a sensible — even shippable — solution. There's no soundness issue here, just an expressivity issue, and it's not unlike all of the other aspects in which new features getting added to Rust increases the expressivity of the zerocopy crate in other ways. (The only difference is that this expressivity gain doesn't require us to explicitly gate an API based on rustc version.) |
Ack. I'll remove this as a 0.8 blocker. |
@jswrenn Any opposition to closing this as not planned? |
No opposition. |
Running
./cargo.sh +msrv test --package zerocopy-derive -- --skip ui
with our MSRV set to 1.58 results in the following test failure:For the time being, we've disabled this test on versions 1.58 and earlier. This isn't a regression because our published crates do not currently support 1.58. That said, we should fix this if possible before releasing 0.8.
So far, I have found the following possible culprits:
In particular this documentation suggests that the
quote!
macro itself may not be the problem:I have not yet tried to replace all
quote!
invocations withquote_spanned!
(passingSpan::call_site()
). That's the first thing to try. Next would be to consider whether an existing token passed toquote!
is carrying its own span information.The text was updated successfully, but these errors were encountered: