diff options
| author | Alejandra González <blyxyas@gmail.com> | 2025-05-23 17:37:41 +0000 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2025-06-20 10:01:19 -0700 |
| commit | 2ec328fec2f8f61bda145b97283683ca8b801fc7 (patch) | |
| tree | ae43ea0ad0575124a0f06f76c68735bd1152e610 /compiler | |
| parent | fd334c7d6b8f5cfbe521093b8e39e0a700536c40 (diff) | |
| download | rust-2ec328fec2f8f61bda145b97283683ca8b801fc7.tar.gz rust-2ec328fec2f8f61bda145b97283683ca8b801fc7.zip | |
`needless_borrow`: do not contradict `dangerous_implicit_autorefs` (rust-lang/rust-clippy#14810)
Rust 1.88 introduces the `dangerous_implicit_autorefs` lint which warns
about using implicit autorefs on a place obtained from a raw pointer, as
this may create aliasing issues.
Prevent `clippy::needless_borrow` from triggering in this case, by
disabling the lint when taking a reference on a raw pointer dereference.
There might be a better way for doing this in the long run with a finer
way of distinguish the problematic cases, but this will prevent Clippy
from contradicting the compiler in the meantime.
Fixes rust-lang/rust-clippy#14743
changelog: [`needless_borrow`]: do not contradict the compiler's
`dangerous_implicit_autorefs` lint even though the refererences are not
mandatory
@rustbot label +beta-nominated
<!-- TRIAGEBOT_START -->
<!-- TRIAGEBOT_SUMMARY_START -->
- [Beta nomination for
1.88](https://github.com/rust-lang/rust-clippy/pull/14810#issuecomment-2883753957)
by [samueltardieu](https://github.com/samueltardieu)
Generated by triagebot, see
[help](https://forge.rust-lang.org/triagebot/note.html) for how to add
more
<!--
TRIAGEBOT_SUMMARY_DATA_START$${"entries_by_url":{"https://github.com/rust-lang/rust-clippy/pull/14810#issuecomment-2883753957":{"title":"Beta
nomination for
1.88","comment_url":"https://github.com/rust-lang/rust-clippy/pull/14810#issuecomment-2883753957","author":"samueltardieu"}}}$$TRIAGEBOT_SUMMARY_DATA_END
-->
<!-- TRIAGEBOT_SUMMARY_END -->
<!-- TRIAGEBOT_END -->
Diffstat (limited to 'compiler')
0 files changed, 0 insertions, 0 deletions
