Commit 7ab910f
authored
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 #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 -->
### Summary Notes
- [Beta nomination for
1.88](#14810 (comment))
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 -->
File tree
4 files changed
+49
-22
lines changed- clippy_lints/src
- tests/ui
4 files changed
+49
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
986 | 986 | | |
987 | 987 | | |
988 | 988 | | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
989 | 998 | | |
990 | 999 | | |
991 | 1000 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | 110 | | |
114 | 111 | | |
115 | 112 | | |
| |||
289 | 286 | | |
290 | 287 | | |
291 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | 110 | | |
114 | 111 | | |
115 | 112 | | |
| |||
289 | 286 | | |
290 | 287 | | |
291 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 106 | | |
113 | | - | |
| 107 | + | |
114 | 108 | | |
115 | 109 | | |
116 | 110 | | |
117 | 111 | | |
118 | 112 | | |
119 | | - | |
| 113 | + | |
120 | 114 | | |
121 | 115 | | |
122 | 116 | | |
123 | 117 | | |
124 | 118 | | |
125 | | - | |
| 119 | + | |
126 | 120 | | |
127 | 121 | | |
128 | 122 | | |
129 | 123 | | |
130 | 124 | | |
131 | | - | |
| 125 | + | |
132 | 126 | | |
133 | 127 | | |
134 | 128 | | |
135 | 129 | | |
136 | 130 | | |
137 | | - | |
| 131 | + | |
138 | 132 | | |
139 | 133 | | |
140 | 134 | | |
141 | 135 | | |
142 | 136 | | |
143 | | - | |
| 137 | + | |
144 | 138 | | |
145 | 139 | | |
146 | 140 | | |
147 | 141 | | |
148 | 142 | | |
149 | | - | |
| 143 | + | |
150 | 144 | | |
151 | 145 | | |
152 | 146 | | |
153 | 147 | | |
154 | 148 | | |
155 | | - | |
| 149 | + | |
156 | 150 | | |
157 | 151 | | |
158 | 152 | | |
159 | 153 | | |
160 | 154 | | |
161 | | - | |
| 155 | + | |
162 | 156 | | |
163 | 157 | | |
164 | 158 | | |
165 | 159 | | |
166 | 160 | | |
167 | | - | |
| 161 | + | |
168 | 162 | | |
169 | 163 | | |
170 | 164 | | |
171 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
0 commit comments