Skip to content

Rollup of 23 pull requests #44380

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

Merged
merged 65 commits into from
Sep 7, 2017
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
c589f86
Add clamp functions
Xaeroxe Aug 26, 2017
f74c5d2
Add NAN examples
Xaeroxe Aug 26, 2017
61f20f8
Fix f32 examples.
Xaeroxe Aug 26, 2017
576426a
Fix f64 examples
Xaeroxe Aug 26, 2017
1d69c98
update unimplemented! docs
MarkMcCaskey Aug 31, 2017
de038b7
Add full git commit hash to release channel manifests
SimonSapin Aug 31, 2017
e572d85
Merge branch 'master' into master
MarkMcCaskey Aug 31, 2017
d308b0b
Add support for Vector Multiply Add Saturated on PowerPC
lu-zero Aug 4, 2017
078c3dd
Add support for Vector Multiply Sum on PowerPC
lu-zero Aug 4, 2017
cccf3e7
Add support for Vector Multiply Sum Saturated on PowerPC
lu-zero Aug 4, 2017
2e34ff7
Fix documentation and formatting.
Xaeroxe Sep 1, 2017
9abc549
Add git-commit-hash in source and extended tarballs too.
SimonSapin Sep 1, 2017
ad5fc2a
Add test for #35676
mattico Sep 2, 2017
f2250c4
Add test for #33185
mattico Sep 2, 2017
570ae39
Merge branch 'master' of git://github.com/rust-lang/rust
MarkMcCaskey Sep 2, 2017
3333262
Minor documentation improvements for StmtKind
zmanian Sep 3, 2017
4260e43
impl Debug for SplitWhitespace.
Sep 3, 2017
adbb820
rustbook: remove dead test functions
RalfJung Sep 4, 2017
9412fd7
Only include git-commit-hash in tarballs when available
SimonSapin Sep 4, 2017
49f1fc5
Add test for #22706
Dushistov Sep 4, 2017
fcefe36
bootstrap: only include docs in extended distribution if enabled
jakllsch Sep 4, 2017
b8cf07e
Improve DefIndex formatting to be more semantic
est31 Sep 4, 2017
69c4728
Make slice::split_at_mut example demonstrate mutability
nielsegberts Sep 4, 2017
76fae71
Fix tests
est31 Sep 4, 2017
e90f423
#33490 is closed remove the FIXME
Eh2406 Sep 4, 2017
b88ec73
#12808 is closed remove the FIXME
Eh2406 Sep 5, 2017
1c5bf24
std/time: Give an example to get UNIX_EPOCH in seconds
kallisti5 Sep 4, 2017
7d94ca6
Removed the incorrect documentation for from_str
mcomstock Sep 5, 2017
b762283
Add panic unit tests
Xaeroxe Sep 5, 2017
280e6d8
Fix link typo in 1.20.0 release notes
WiSaGaN Sep 5, 2017
f912d77
Make git commit info optional and per-package in channel manifests
SimonSapin Sep 4, 2017
668d8ff
Add support for Vector Sum Across Partial 1/2 Saturated on PowerPC
lu-zero Aug 4, 2017
eec1c17
Add support for Vector Sum Across Partial 1/4 Saturated on PowerPC
lu-zero Aug 4, 2017
c3041e8
Add support for Vector Sum Saturated on PowerPC
lu-zero Aug 4, 2017
110efe2
Include rustc in the default `./x.py install`
cuviper Sep 5, 2017
2047a0d
bootstrap: add openssl config for sparc64-unknown-netbsd
jakllsch Aug 31, 2017
847d1ff
bootstrap: avoid m4 -B for NetBSD-built sparc64 OpenSSL
jakllsch Aug 31, 2017
af3536d
Remove trailing white space
zmanian Sep 6, 2017
ddd0145
Suggest changing literals instead of calling methods (fixes #44307)
oli-obk Sep 6, 2017
02fb1b0
Fix a bug in the inliner
oli-obk Sep 6, 2017
5bb870f
Reintroduce the early returns
oli-obk Sep 6, 2017
04cbf6e
config.toml.example: fix some typos
mathstuf Sep 6, 2017
44351ed
Rollup merge of #44097 - Xaeroxe:clamp, r=burntsushi
Mark-Simulacrum Sep 7, 2017
b8812a2
Rollup merge of #44206 - MarkMcCaskey:master, r=steveklabnik
Mark-Simulacrum Sep 7, 2017
da5e5ef
Rollup merge of #44218 - SimonSapin:commit-hash, r=alexcrichton
Mark-Simulacrum Sep 7, 2017
2dabf35
Rollup merge of #44276 - mattico:test-35376, r=alexcrichton
Mark-Simulacrum Sep 7, 2017
5c79f6d
Rollup merge of #44277 - mattico:test-33185, r=nikomatsakis
Mark-Simulacrum Sep 7, 2017
fee0b67
Rollup merge of #44296 - zmanian:patch-1, r=steveklabnik
Mark-Simulacrum Sep 7, 2017
923c351
Rollup merge of #44303 - clarcharr:debugs, r=alexcrichton
Mark-Simulacrum Sep 7, 2017
50f14e9
Rollup merge of #44313 - RalfJung:book, r=nikomatsakis
Mark-Simulacrum Sep 7, 2017
fdb8d0b
Rollup merge of #44315 - kallisti5:epoch-doc-example-squashed, r=Guil…
Mark-Simulacrum Sep 7, 2017
089bbd0
Rollup merge of #44317 - Dushistov:master, r=arielb1
Mark-Simulacrum Sep 7, 2017
4051233
Rollup merge of #44319 - est31:master, r=eddyb
Mark-Simulacrum Sep 7, 2017
596e97f
Rollup merge of #44321 - jakllsch:jakllsch-4f2d6c87-2674-43e4-9c5f-24…
Mark-Simulacrum Sep 7, 2017
a4b5484
Rollup merge of #44325 - nielsegberts:master, r=steveklabnik
Mark-Simulacrum Sep 7, 2017
43d20c7
Rollup merge of #44326 - Eh2406:FIXME#44590, r=arielb1
Mark-Simulacrum Sep 7, 2017
d2c85a0
Rollup merge of #44327 - Eh2406:FIXME#12808, r=aturon
Mark-Simulacrum Sep 7, 2017
e7470c9
Rollup merge of #44328 - mcomstock:from-str-doc-fix, r=steveklabnik
Mark-Simulacrum Sep 7, 2017
ae96d68
Rollup merge of #44330 - WiSaGaN:patch-1, r=aturon
Mark-Simulacrum Sep 7, 2017
b0929aa
Rollup merge of #44351 - lu-zero:master, r=nikomatsakis
Mark-Simulacrum Sep 7, 2017
eba44f1
Rollup merge of #44353 - cuviper:install-rustc, r=Mark-Simulacrum
Mark-Simulacrum Sep 7, 2017
48dcebd
Rollup merge of #44354 - jakllsch:jakllsch-85453197-a0cc-43f6-8c55-7b…
Mark-Simulacrum Sep 7, 2017
f8b7c3e
Rollup merge of #44361 - oli-obk:lit_sugg, r=nikomatsakis
Mark-Simulacrum Sep 7, 2017
435a5cd
Rollup merge of #44362 - oli-obk:patch-7, r=eddyb
Mark-Simulacrum Sep 7, 2017
6667058
Rollup merge of #44377 - mathstuf:config.toml-typos, r=alexcrichton
Mark-Simulacrum Sep 7, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix f32 examples.
  • Loading branch information
Xaeroxe authored Aug 26, 2017
commit 61f20f8df02e53ee60dc1719ce0e502eecebf8b4
6 changes: 4 additions & 2 deletions src/libstd/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1081,15 +1081,17 @@ impl f32 {
}

/// Returns max if self is greater than max, and min if self is less than min.
/// Otherwise this returns self. Panics if min > max, min equals NaN, or max equals NaN.
/// Otherwise this returns self. Panics if min > max, min is NaN, or max is NaN.
///
/// # Examples
///
/// ```
/// #![feature(clamp)]
/// use std::f32::NAN;
/// 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!((NAN).clamp(-2.0f32, 1.0f32) == NAN);
/// assert!((NAN).clamp(-2.0f32, 1.0f32).is_nan());
/// ```
#[unstable(feature = "clamp", issue = "44095")]
#[inline]
Expand Down