Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRename `try!` macro for 2018 compatibility #1385
Comments
This comment has been minimized.
This comment has been minimized.
Mark-Simulacrum
commented
Sep 12, 2018
|
Hm, it's not clear to me that Serde should be responsible for making this change? That is, when/if Serde migrates to 2018 edition then it should but prior to that it was my understanding that edition hygiene should not require this -- am I wrong about that? |
This comment has been minimized.
This comment has been minimized.
|
You're correct that users should not get edition related warnings from the expansion of external macros. |
This comment has been minimized.
This comment has been minimized.
Mark-Simulacrum
commented
Sep 12, 2018
|
I'm not quite sure what the intent of this issue is then since I can't seem to produce any warnings -- is this just a long-term cleanup? |
This comment has been minimized.
This comment has been minimized.
|
I'm not clear then. Is this something we need to prioritize before the edition? Or is this just tracking work that needs to happen at some point before we change our own edition to 2018, which may be years later? |
This comment has been minimized.
This comment has been minimized.
|
According to the user report on internals, the compiler might not be successfully performing edition hygiene in all cases. Obviously, this is a bug in the compiler. But this seems like a small change to serde_derive that would help mitigate edition hygiene bugs and keep them from impacting the many users of this crate. |
This comment has been minimized.
This comment has been minimized.
|
Internals thread: Trying Rust2018, getting many warnings on `try` is a keyword I am not able to reproduce the warnings reported there. If anyone succeeds in reproducing and can explain why this is something that a large number of users would encounter, then I can reconsider, but for now I am closing this issue. Thanks anyway! We'll take care of this when moving Serde to 2018 but don't need an issue to track this specific piece of that work. Hopefully this helps track down the remaining places were edition hygiene is going wrong. I believe our use of |
withoutboats commentedSep 12, 2018
serde derive uses a custom defined
try!macro internally, rather than?. However,tryis becoming a reserved word in the 2018 edition. For compatibility with 2018, it would be ideal if you renamed this macro.