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 NAN test to docs #59327

Merged
merged 3 commits into from
Mar 23, 2019
Merged

Add NAN test to docs #59327

merged 3 commits into from
Mar 23, 2019

Conversation

Xaeroxe
Copy link
Contributor

@Xaeroxe Xaeroxe commented Mar 20, 2019

Documents and tests NAN behavior for the new (f32, f64)::clamp function.

@rust-highfive
Copy link
Collaborator

r? @Kimundi

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 20, 2019
@Xaeroxe Xaeroxe mentioned this pull request Mar 20, 2019
3 tasks
@rust-highfive

This comment has been minimized.

@@ -970,6 +970,7 @@ impl f32 {
/// assert!((-3.0f32).clamp(-2.0f32, 1.0f32) == -2.0f32);
/// assert!((0.0f32).clamp(-2.0f32, 1.0f32) == 0.0f32);
/// assert!((2.0f32).clamp(-2.0f32, 1.0f32) == 1.0f32);
/// assert!((std::f32::NAN).clamp(-2.0f32, 1.0f32).is_nan());
/// ```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we may use assert_eq macro for those assertions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the ones other than the new one, I agree, but because that's existing stuff, I don't think we need to block this PR landing for that.

@scottmcm scottmcm assigned scottmcm and unassigned Kimundi Mar 21, 2019
@scottmcm
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 21, 2019

📌 Commit 72f5d91 has been approved by scottmcm

@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 Mar 21, 2019
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Mar 22, 2019
Add NAN test to docs

Documents and tests NAN behavior for the new (f32, f64)::clamp function.
Centril added a commit to Centril/rust that referenced this pull request Mar 22, 2019
Add NAN test to docs

Documents and tests NAN behavior for the new (f32, f64)::clamp function.
bors added a commit that referenced this pull request Mar 22, 2019
Rollup of 18 pull requests

Successful merges:

 - #59106 (Add peer_addr function to UdpSocket)
 - #59170 (Add const generics to rustdoc)
 - #59172 (Update and clean up several parts of CONTRIBUTING.md)
 - #59190 (consistent naming for Rhs type parameter in libcore/ops)
 - #59236 (Rename miri component to miri-preview)
 - #59266 (Do not complain about non-existing fields after parse recovery)
 - #59273 (some small HIR doc improvements)
 - #59291 (Make Option<ThreadId> no larger than ThreadId, with NonZeroU64)
 - #59297 (convert field/method confusion help to suggestions)
 - #59304 (Move some bench tests back from libtest)
 - #59309 (Add messages for different verbosity levels. Output copy actions.)
 - #59321 (Unify E0109, E0110 and E0111)
 - #59322 (Tweak incorrect escaped char diagnostic)
 - #59323 (use suggestions for "enum instead of variant" error)
 - #59327 (Add NAN test to docs)
 - #59329 (cleanup: Remove compile-fail-fulldeps directory again)
 - #59347 (Move one test from run-make-fulldeps to ui)
 - #59360 (Add tracking issue number for `seek_convenience`)

Failed merges:

r? @ghost
@bors bors merged commit 72f5d91 into rust-lang:master Mar 23, 2019
@Xaeroxe Xaeroxe deleted the clamp-doc branch August 3, 2020 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants