rust
rust copied to clipboard
Add detection of [Partial]Ord methods in the `ambiguous_wide_pointer_comparisons` lint
Partially addresses https://github.com/rust-lang/rust/issues/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.
r? @estebank
rustbot has assigned @estebank. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
:umbrella: The latest upstream changes (presumably #119673) made this pull request unmergeable. Please resolve the merge conflicts.
@estebank ping.
r? compiler
r? @Nadrieril (as discussed privately)
I've addressed all the review comments and CI passes; this is ready.
@rustbot ready
Thanks!
@bors r+
:pushpin: Commit d4b514f982e4214e0f9237c905670b1207ae0c95 has been approved by Nadrieril
It is now in the queue for this repository.
:hourglass: Testing commit d4b514f982e4214e0f9237c905670b1207ae0c95 with merge af4a5a13a15fa0c60e06321077ef452f769b42fd...
:sunny: Test successful - checks-actions Approved by: Nadrieril Pushing af4a5a13a15fa0c60e06321077ef452f769b42fd to master...
Finished benchmarking commit (af4a5a13a15fa0c60e06321077ef452f769b42fd): comparison URL.
Overall result: ❌✅ regressions and improvements - ACTION NEEDED
Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.
@rustbot label: +perf-regression cc @rust-lang/wg-compiler-performance
Instruction count
This is a highly reliable metric that was used to determine the overall result at the top of this comment.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
- | - | 0 |
| Regressions ❌ (secondary) |
2.2% | [2.2%, 2.2%] | 1 |
| Improvements ✅ (primary) |
-0.5% | [-0.7%, -0.3%] | 2 |
| Improvements ✅ (secondary) |
-1.4% | [-3.5%, -0.2%] | 3 |
| All ❌✅ (primary) | -0.5% | [-0.7%, -0.3%] | 2 |
Max RSS (memory usage)
Results
This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
- | - | 0 |
| Regressions ❌ (secondary) |
2.3% | [2.3%, 2.3%] | 1 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
- | - | 0 |
| All ❌✅ (primary) | - | - | 0 |
Cycles
Results
This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
- | - | 0 |
| Regressions ❌ (secondary) |
3.4% | [2.3%, 4.2%] | 3 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
- | - | 0 |
| All ❌✅ (primary) | - | - | 0 |
Binary size
This benchmark run did not return any relevant results for this metric.
Bootstrap: 669.534s -> 667.985s (-0.23%) Artifact size: 315.85 MiB -> 315.84 MiB (-0.00%)
One secondary regression on incr alongside some improvements even on the same bench, nothing to worry about