Commit 6a297e8
committed
Auto merge of rust-lang#121268 - Urgau:improve_ambi_wide_ptr_cmps, r=Nadrieril
Add detection of [Partial]Ord methods in the `ambiguous_wide_pointer_comparisons` lint
Partially addresses rust-lang#121264 by adding diagnostics items for PartialOrd and Ord methods, detecting such diagnostics items as "binary operation" and suggesting the correct replacement.
I also took the opportunity to change the suggestion to use new methods `.cast()` on `*mut T` an d `*const T`.File tree
5 files changed
+12
-0
lines changed- core/src
- ptr
5 files changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
848 | 848 | | |
849 | 849 | | |
850 | 850 | | |
| 851 | + | |
851 | 852 | | |
852 | 853 | | |
853 | 854 | | |
| |||
868 | 869 | | |
869 | 870 | | |
870 | 871 | | |
| 872 | + | |
871 | 873 | | |
872 | 874 | | |
873 | 875 | | |
| |||
1154 | 1156 | | |
1155 | 1157 | | |
1156 | 1158 | | |
| 1159 | + | |
1157 | 1160 | | |
1158 | 1161 | | |
1159 | 1162 | | |
| |||
1168 | 1171 | | |
1169 | 1172 | | |
1170 | 1173 | | |
| 1174 | + | |
1171 | 1175 | | |
1172 | 1176 | | |
1173 | 1177 | | |
| |||
1185 | 1189 | | |
1186 | 1190 | | |
1187 | 1191 | | |
| 1192 | + | |
1188 | 1193 | | |
1189 | 1194 | | |
1190 | 1195 | | |
| |||
1201 | 1206 | | |
1202 | 1207 | | |
1203 | 1208 | | |
| 1209 | + | |
1204 | 1210 | | |
1205 | 1211 | | |
1206 | 1212 | | |
| |||
1218 | 1224 | | |
1219 | 1225 | | |
1220 | 1226 | | |
| 1227 | + | |
1221 | 1228 | | |
1222 | 1229 | | |
1223 | 1230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1857 | 1857 | | |
1858 | 1858 | | |
1859 | 1859 | | |
| 1860 | + | |
1860 | 1861 | | |
1861 | 1862 | | |
1862 | 1863 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2275 | 2275 | | |
2276 | 2276 | | |
2277 | 2277 | | |
| 2278 | + | |
2278 | 2279 | | |
2279 | 2280 | | |
2280 | 2281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1821 | 1821 | | |
1822 | 1822 | | |
1823 | 1823 | | |
| 1824 | + | |
1824 | 1825 | | |
1825 | 1826 | | |
1826 | 1827 | | |
| |||
1829 | 1830 | | |
1830 | 1831 | | |
1831 | 1832 | | |
| 1833 | + | |
1832 | 1834 | | |
1833 | 1835 | | |
1834 | 1836 | | |
| |||
0 commit comments