Skip to content

Conversation

chenyukang
Copy link
Member

@chenyukang chenyukang commented Oct 28, 2023

Fixes #117142

The original check only checks a as (i32) < 0, this fix extends it to handle b + a as (i32) < 0.

A better way is maybe we suggest (a as i32) < 0 instead of suppressing the warning, maybe following PR could improve it.

@rustbot
Copy link
Collaborator

rustbot commented Oct 28, 2023

r? @petrochenkov

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 28, 2023
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 31, 2023
@chenyukang
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 12, 2024
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 12, 2024

📌 Commit eef4e65 has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 12, 2024
@bors
Copy link
Collaborator

bors commented Jan 12, 2024

⌛ Testing commit eef4e65 with merge 3071aef...

@bors
Copy link
Collaborator

bors commented Jan 13, 2024

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 3071aef to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 13, 2024
@bors bors merged commit 3071aef into rust-lang:master Jan 13, 2024
@rustbot rustbot added this to the 1.77.0 milestone Jan 13, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3071aef): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

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.8% [0.7%, 1.0%] 2
Regressions ❌
(secondary)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [0.7%, 1.0%] 2

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.5% [0.5%, 0.5%] 2
Regressions ❌
(secondary)
1.3% [1.3%, 1.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [0.5%, 0.5%] 2

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 665.459s -> 665.943s (0.07%)
Artifact size: 308.09 MiB -> 308.12 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

suggestion in unused_parens diagnostic when cast is followed by less-than produces broken code
5 participants