-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
rustfix: Autofix try! macro in edition lint to use ?
operator
#65148
Comments
This comment has been minimized.
This comment has been minimized.
I've got code with a load of I'm interested in working on it if no-one else is. I haven't worked on rustc so there'll be some learning for me to do first. |
FYI: rustfmt already provides a feature to replace |
iirc we took a fairly explicit decision to migrate to |
But this is edition lint for anyone want to migrate from 2015 to 2018 edition. |
@Centril under what circumstances can |
The lowering of |
We discussed this in our lang team meeting on 2019-10-17. We concluded that we would prefer not to try to create such a lint. In short, nothing has changed since the Edition handover: it is still hard to get this lint correct and it doesn't seem worth the effort to maintain it (and fix the inevitable bugs). We prefer the rustfmt "normalize |
@nikomatsakis The one downside of using rustfmt for this: it's difficult to disable the rest of rustfmt, if you don't want to combine reformatting your code with substantive changes to your code. Would it be possible to add (and document) a method for converting |
@joshtriplett Personally, I think you should reformat the rest of your code first, and then enable the rustfmt option to convert That said, I think that there used to be some tool for converting |
Now
try!
macro has been deprecated in #62672. I think it's time to automaticallyfix
try!(expr)
toexpr?
in edition lint.The text was updated successfully, but these errors were encountered: