-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add clippy::result_as_ref_deref
lint
#13474
base: master
Are you sure you want to change the base?
Add clippy::result_as_ref_deref
lint
#13474
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Jarcho (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
781b3cd
to
e1a8ff9
Compare
Uh. I think I messed something up. I've pulled master branch to be up to date, rebased my working branch on top of it, and now tests don't pass and a whole bunch of code needs to be reformatted. However when I look at the diff between my branch and upstream/master I only see my changes. Help would be appreciated. 😃 EDIT. After some more rebasing and tweaking all seams to work now. I don't know what I did previously wrong, but now CI passes. |
1b386e5
to
0349ca7
Compare
0349ca7
to
afad426
Compare
I was browsing the standard library, and have found one more "similar" pattern. One problem though is that this method is unstable. I've read its tracking issue and if I understand correctly1, its FCP has just finished, so it should be stable pretty soon. If such lint were to be added, would it have to wait until Do you think it would be good to add such a lint? Sorry for writing about it in this PR. I thought it would be better to ask about it here, because it loosely relates to lints that I am working on here. If you believe that this discussion should be moved to separate issue, please tell me so. One way that this would relate to lints that I worked on in this PR is naming. There is already open question in this PR about naming of lints that check for I thing that this is pretty obvious that it should be a separate lint, and not joined with Footnotes
|
I haven't heard back from my assigned reviewer for last 2 weeks, so I took liberty to re-roll reviewer using a fair dice. I hope you won't mind it. 😃 r? @Alexendoo |
changelog: added new lint
result_as_ref_deref
closes #13342
I've added new lint
result_as_ref_deref
, which mirrors already existing lintoption_as_ref_deref
and reused its existingcheck
function.Open question is should this be another lint, or should two of them be merged together? I've asked about it in the original issue (proposing
manual_as_ref_deref
name), and @Jarcho suggested the same thing (and proposedmanual_fallible_as_deref
name).I'm not sure what is clippy's policy regarding renaming lint names, so I opted into just adding new lint and waiting for the review.