-
Notifications
You must be signed in to change notification settings - Fork 1.8k
WIP New lint: borrowed_option #11463
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
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @blyxyas (or someone else) soon. 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 (
|
|
Regarding The lint documentation should provide examples of why it does this (this i.e. exposes implementation details). The example given is fine, but some who aren't too familiar with the borrow checker may question why this exposes implementation details. |
We should probably make a new lint type for borrows and references. cc #11464 |
|
☔ The latest upstream changes (presumably #11460) made this pull request unmergeable. Please resolve the merge conflicts. |
…e::get_placeholders_with_values` <rust-lang/rust-clippy#11463>
* Take `&str` instead of `&String` in `ParamValue::get_placeholders_with_values` <https://rust-lang.github.io/rust-clippy/master/index.html#/ptr_arg> * Take `Option<&DataType>` instead of `&Option<DataType>` in `ParamValue::get_placeholders_with_values` <rust-lang/rust-clippy#11463> * Take `&[_]` instead of `&Vec<_>` in `ParamValues::verify` <https://rust-lang.github.io/rust-clippy/master/index.html#/ptr_arg> --------- Co-authored-by: Andrew Lamb <[email protected]>
|
Hey @tom-anders, this is a ping from triage, since there hasn't been any activity in some time. Could you rebase the branch on master? If you have any questions, you're always welcome to ask them in this PR or on Zulip. @rustbot author |
7f5486e to
09929e1
Compare
09929e1 to
6919b2c
Compare
|
(fixed formatting) |
|
Perfect, thank you for the swift update :D @rustbot ready |
|
Hey, this is triage: It looks like @blyxyas is currently busy, let's pick a new reviewer. r? clippy |
|
☔ The latest upstream changes (presumably #13442) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
|
Ping @tom-anders from triage. Do you plan to come back to working on this? |
6919b2c to
2455e01
Compare
|
Thanks for the reminder, I rebased to solve the merge conflicts and also adressed all of @Alexendoo's comments (thanks for the review!) |
a70ffcf to
bec2f86
Compare
|
Lintcheck changes for 97c77d4
This comment will be updated if you push new changes |
bec2f86 to
dbc9383
Compare
|
☔ The latest upstream changes (possibly 14d36c7) made this pull request unmergeable. Please resolve the merge conflicts. |
This is inspired by this excellent video: https://www.youtube.com/watch?v=6c7pZYP_iIE
Some things I'd appreciate feedback on:
borrowed_box.rscheck, since these two lints would share a lot of common code. We should probably rename that file, but to what?borrowed_box_or_option.rs? (same goes for the tests) (Edit: looks like the corresponding issue has been closed for now, so let's keep it like it is for now?&Box<Any>(seeborrowed_boxlint andAny#1884), I'm not sure if this is needed for&Option<Any>as well.What it doesandWhy is this badcould probably use some improvements, suggestions are welcome!changelog: new lint: [
borrowed_option]