-
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
Add borrow_as_ptr lint #8210
Add borrow_as_ptr lint #8210
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Manishearth (or someone else) soon. Please see the contribution instructions for more information. |
clippy_lints/src/borrow_as_ptr.rs
Outdated
/// ``` | ||
#[clippy::version = "1.60.0"] | ||
pub BORROW_AS_PTR, | ||
correctness, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely not correctness, I'd say style? It can be incorrect in some cases but it's also a pattern used a lot by people.
Honestly, kinda feel like we might want to start with pedantic.
I think it's a correctness issue when dealing with e.g. MaybeUninit, but otherwise this is a common pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to style :)
☔ The latest upstream changes (presumably #8236) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #8260) made this pull request unmergeable. Please resolve the merge conflicts. |
Closes: #6995 Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com> Co-authored-by: Paolo Barbolini <paolo@paolo565.org>
@bors r+ thanks for being patient! |
📌 Commit 3298de7 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Closes: #6995
.stderr
file)cargo test
passes locallycargo dev update_lints
cargo dev fmt
changelog: new lint: [
borrow_as_ptr
]