-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
lint type &Option<&T>
#1377
Comments
This applies to |
Does it though? With a |
@shepmaster I think you misunderstood; |
@shepmaster's comment still applies. You cannot set the shared |
Add lint 'ref_option_ref' #1377 This lint checks for usage of `&Option<&T>` which can be simplified as `Option<&T>` as suggested in #1377. This WIP PR is here to get feedback on the lint as there's more cases to be handled: * statics/consts, * associated types, * type alias, * function/method parameter/return, * ADT definitions (struct/tuple struct fields, enum variants) changelog: Add 'ref_option_ref' lint
since
&
isCopy
, just suggest to useOption<&T>
The text was updated successfully, but these errors were encountered: