Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add better assert messages for f32/f64 clamps #101959

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

Xaeroxe
Copy link
Contributor

@Xaeroxe Xaeroxe commented Sep 18, 2022

No description provided.

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Sep 18, 2022
@rust-highfive
Copy link
Contributor

r? @joshtriplett

(rust-highfive has picked a reviewer for you, use r? to override)

@rustbot
Copy link
Collaborator

rustbot commented Sep 18, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 18, 2022
@Xaeroxe Xaeroxe force-pushed the clamp-better-assert branch from 874eb5d to cbb153a Compare September 18, 2022 00:11
@rust-log-analyzer

This comment has been minimized.

@Xaeroxe Xaeroxe force-pushed the clamp-better-assert branch from cbb153a to 318c7f2 Compare September 18, 2022 01:23
@joshtriplett
Copy link
Member

Minor tweak to the message, but otherwise LGTM. r=me with the suggestions (or similar) applied.

@joshtriplett joshtriplett 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 3, 2022
@Xaeroxe Xaeroxe force-pushed the clamp-better-assert branch from 318c7f2 to c7f54da Compare October 3, 2022 15:39
@Xaeroxe
Copy link
Contributor Author

Xaeroxe commented Oct 3, 2022

Does this work?

@bors r=@joshtriplett

@bors
Copy link
Collaborator

bors commented Oct 3, 2022

@Xaeroxe: 🔑 Insufficient privileges: Not in reviewers

@Xaeroxe
Copy link
Contributor Author

Xaeroxe commented Oct 10, 2022

I'd like this to go into the 1.66 release. With the inclusion of the new clippy lint manual_clamp in 1.66, more people are going to trigger this panic message than they would in 1.65

@Xaeroxe
Copy link
Contributor Author

Xaeroxe commented Oct 31, 2022

@joshtriplett this is ready for re-review

@JohnCSimon
Copy link
Member

ping from triage:
@Xaeroxe

FYI: when a PR is ready for review, send a message containing
@rustbot ready to switch to S-waiting-on-review so the PR is in the reviewer's backlog.

doing this for you -
@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 1, 2023
@Xaeroxe
Copy link
Contributor Author

Xaeroxe commented Jan 1, 2023

Thank you!

@ChrisDenton
Copy link
Member

lgtm, thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 14, 2023

📌 Commit c7f54da has been approved by ChrisDenton

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 Apr 14, 2023
@bors
Copy link
Collaborator

bors commented Apr 14, 2023

⌛ Testing commit c7f54da with merge 3e565f1...

@bors
Copy link
Collaborator

bors commented Apr 14, 2023

☀️ Test successful - checks-actions
Approved by: ChrisDenton
Pushing 3e565f1 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 14, 2023
@bors bors merged commit 3e565f1 into rust-lang:master Apr 14, 2023
@rustbot rustbot added this to the 1.70.0 milestone Apr 14, 2023
@Xaeroxe Xaeroxe deleted the clamp-better-assert branch April 14, 2023 14:00
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3e565f1): 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
Regressions ❌
(secondary)
1.6% [1.6%, 1.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
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)
2.3% [2.2%, 2.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants