Skip to content

Commit 48e9ef6

Browse files
committed
Auto merge of #25958 - Manishearth:rollup, r=Manishearth
- Successful merges: #25751, #25821, #25920, #25932, #25933, #25936, #25941, #25949, #25951 - Failed merges:
2 parents f141901 + 6e97b16 commit 48e9ef6

File tree

10 files changed

+31
-22
lines changed

10 files changed

+31
-22
lines changed

mk/main.mk

+1-7
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),)
7474
endif
7575
endif
7676

77-
CFG_BUILD_DATE = $(shell date +%F)
78-
CFG_VERSION += (built $(CFG_BUILD_DATE))
79-
8077
# Windows exe's need numeric versions - don't use anything but
8178
# numbers and dots here
8279
CFG_VERSION_WIN = $(CFG_RELEASE_NUM)
@@ -130,9 +127,7 @@ CFG_JEMALLOC_FLAGS += $(JEMALLOC_FLAGS)
130127

131128
ifdef CFG_ENABLE_DEBUG_ASSERTIONS
132129
$(info cfg: enabling debug assertions (CFG_ENABLE_DEBUG_ASSERTIONS))
133-
CFG_RUSTC_FLAGS += --cfg debug -C debug-assertions=on
134-
else
135-
CFG_RUSTC_FLAGS += --cfg ndebug
130+
CFG_RUSTC_FLAGS += -C debug-assertions=on
136131
endif
137132

138133
ifdef CFG_ENABLE_DEBUGINFO
@@ -334,7 +329,6 @@ endif
334329
ifdef CFG_VER_HASH
335330
export CFG_VER_HASH
336331
endif
337-
export CFG_BUILD_DATE
338332
export CFG_VERSION
339333
export CFG_VERSION_WIN
340334
export CFG_RELEASE

src/doc/index.md

+11
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,14 @@ something if you know its name.
8686

8787
If you encounter an error while compiling your code you may be able to look it
8888
up in the [Rust Compiler Error Index](error-index.html).
89+
90+
# Community Translations
91+
92+
Several projects have been started to translate the documentation into other
93+
languages:
94+
95+
- [Russian](https://github.com/kgv/rust_book_ru)
96+
- [Korean](https://github.com/rust-kr/doc.rust-kr.org)
97+
- [Chinese](https://github.com/KaiserY/rust-book-chinese)
98+
- [Spanish](https://github.com/goyox86/elpr)
99+

src/doc/trpl/iterators.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ You can chain all three things together: start with an iterator, adapt it
321321
a few times, and then consume the result. Check it out:
322322

323323
```rust
324-
(1..1000)
324+
(1..)
325325
.filter(|&x| x % 2 == 0)
326326
.filter(|&x| x % 3 == 0)
327327
.take(5)

src/doc/trpl/raw-pointers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ For more operations on raw pointers, see [their API documentation][rawapi].
7777
# FFI
7878

7979
Raw pointers are useful for FFI: Rust’s `*const T` and `*mut T` are similar to
80-
C’s `const T*` and `T*`, respectfully. For more about this use, consult the
80+
C’s `const T*` and `T*`, respectively. For more about this use, consult the
8181
[FFI chapter][ffi].
8282

8383
[ffi]: ffi.html

src/libcollections/string.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,7 @@ impl String {
495495
///
496496
/// ```
497497
/// let s = String::from("hello");
498-
/// let b: &[_] = &[104, 101, 108, 108, 111];
499-
/// assert_eq!(s.as_bytes(), b);
498+
/// assert_eq!(s.as_bytes(), [104, 101, 108, 108, 111]);
500499
/// ```
501500
#[inline]
502501
#[stable(feature = "rust1", since = "1.0.0")]

src/libcore/option.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,11 @@ impl<T> Option<T> {
409409
/// Convert an `Option<String>` into an `Option<usize>`, consuming the original:
410410
///
411411
/// ```
412-
/// let num_as_str: Option<String> = Some("10".to_string());
413-
/// // `Option::map` takes self *by value*, consuming `num_as_str`
414-
/// let num_as_int: Option<usize> = num_as_str.map(|n| n.len());
412+
/// let maybe_some_string = Some(String::from("Hello, World!"));
413+
/// // `Option::map` takes self *by value*, consuming `maybe_some_string`
414+
/// let maybe_some_len = maybe_some_string.map(|s| s.len());
415+
///
416+
/// assert_eq!(maybe_some_len, Some(13));
415417
/// ```
416418
#[inline]
417419
#[stable(feature = "rust1", since = "1.0.0")]

src/librustc_driver/lib.rs

-5
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,6 @@ pub fn commit_date_str() -> Option<&'static str> {
483483
option_env!("CFG_VER_DATE")
484484
}
485485

486-
pub fn build_date_str() -> Option<&'static str> {
487-
option_env!("CFG_BUILD_DATE")
488-
}
489-
490486
/// Prints version information and returns None on success or an error
491487
/// message on panic.
492488
pub fn version(binary: &str, matches: &getopts::Matches) {
@@ -498,7 +494,6 @@ pub fn version(binary: &str, matches: &getopts::Matches) {
498494
println!("binary: {}", binary);
499495
println!("commit-hash: {}", unw(commit_hash_str()));
500496
println!("commit-date: {}", unw(commit_date_str()));
501-
println!("build-date: {}", unw(build_date_str()));
502497
println!("host: {}", config::host_triple());
503498
println!("release: {}", unw(release_str()));
504499
}

src/librustdoc/html/static/main.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,10 @@ nav.sub {
338338
font-size: 1em;
339339
position: relative;
340340
}
341-
/* Shift "where ..." part of method definition down a line */
342-
.content .method .where { display: block; }
341+
/* Shift "where ..." part of method or fn definition down a line */
342+
.content .method .where, .content .fn .where { display: block; }
343343
/* Bit of whitespace to indent it */
344-
.content .method .where::before { content: ' '; }
344+
.content .method .where::before, .content .fn .where::before { content: ' '; }
345345

346346
.content .methods > div { margin-left: 40px; }
347347

src/libstd/num/f32.rs

+4
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,8 @@ impl f32 {
660660
///
661661
/// assert_eq!(x.max(y), y);
662662
/// ```
663+
///
664+
/// If one of the arguments is NaN, then the other argument is returned.
663665
#[stable(feature = "rust1", since = "1.0.0")]
664666
#[inline]
665667
pub fn max(self, other: f32) -> f32 {
@@ -674,6 +676,8 @@ impl f32 {
674676
///
675677
/// assert_eq!(x.min(y), x);
676678
/// ```
679+
///
680+
/// If one of the arguments is NaN, then the other argument is returned.
677681
#[stable(feature = "rust1", since = "1.0.0")]
678682
#[inline]
679683
pub fn min(self, other: f32) -> f32 {

src/libstd/num/f64.rs

+4
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,8 @@ impl f64 {
636636
///
637637
/// assert_eq!(x.max(y), y);
638638
/// ```
639+
///
640+
/// If one of the arguments is NaN, then the other argument is returned.
639641
#[stable(feature = "rust1", since = "1.0.0")]
640642
#[inline]
641643
pub fn max(self, other: f64) -> f64 {
@@ -650,6 +652,8 @@ impl f64 {
650652
///
651653
/// assert_eq!(x.min(y), x);
652654
/// ```
655+
///
656+
/// If one of the arguments is NaN, then the other argument is returned.
653657
#[stable(feature = "rust1", since = "1.0.0")]
654658
#[inline]
655659
pub fn min(self, other: f64) -> f64 {

0 commit comments

Comments
 (0)