Skip to content

Rollup of 9 pull requests #25958

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 18 commits into from
Jun 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
8 changes: 1 addition & 7 deletions mk/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),)
endif
endif

CFG_BUILD_DATE = $(shell date +%F)
CFG_VERSION += (built $(CFG_BUILD_DATE))

# Windows exe's need numeric versions - don't use anything but
# numbers and dots here
CFG_VERSION_WIN = $(CFG_RELEASE_NUM)
Expand Down Expand Up @@ -130,9 +127,7 @@ CFG_JEMALLOC_FLAGS += $(JEMALLOC_FLAGS)

ifdef CFG_ENABLE_DEBUG_ASSERTIONS
$(info cfg: enabling debug assertions (CFG_ENABLE_DEBUG_ASSERTIONS))
CFG_RUSTC_FLAGS += --cfg debug -C debug-assertions=on
else
CFG_RUSTC_FLAGS += --cfg ndebug
CFG_RUSTC_FLAGS += -C debug-assertions=on
endif

ifdef CFG_ENABLE_DEBUGINFO
Expand Down Expand Up @@ -334,7 +329,6 @@ endif
ifdef CFG_VER_HASH
export CFG_VER_HASH
endif
export CFG_BUILD_DATE
export CFG_VERSION
export CFG_VERSION_WIN
export CFG_RELEASE
Expand Down
11 changes: 11 additions & 0 deletions src/doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,14 @@ something if you know its name.

If you encounter an error while compiling your code you may be able to look it
up in the [Rust Compiler Error Index](error-index.html).

# Community Translations

Several projects have been started to translate the documentation into other
languages:

- [Russian](https://github.com/kgv/rust_book_ru)
- [Korean](https://github.com/rust-kr/doc.rust-kr.org)
- [Chinese](https://github.com/KaiserY/rust-book-chinese)
- [Spanish](https://github.com/goyox86/elpr)

2 changes: 1 addition & 1 deletion src/doc/trpl/iterators.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ You can chain all three things together: start with an iterator, adapt it
a few times, and then consume the result. Check it out:

```rust
(1..1000)
(1..)
.filter(|&x| x % 2 == 0)
.filter(|&x| x % 3 == 0)
.take(5)
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/raw-pointers.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ For more operations on raw pointers, see [their API documentation][rawapi].
# FFI

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

[ffi]: ffi.html
Expand Down
3 changes: 1 addition & 2 deletions src/libcollections/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,7 @@ impl String {
///
/// ```
/// let s = String::from("hello");
/// let b: &[_] = &[104, 101, 108, 108, 111];
/// assert_eq!(s.as_bytes(), b);
/// assert_eq!(s.as_bytes(), [104, 101, 108, 108, 111]);
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down
8 changes: 5 additions & 3 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,11 @@ impl<T> Option<T> {
/// Convert an `Option<String>` into an `Option<usize>`, consuming the original:
///
/// ```
/// let num_as_str: Option<String> = Some("10".to_string());
/// // `Option::map` takes self *by value*, consuming `num_as_str`
/// let num_as_int: Option<usize> = num_as_str.map(|n| n.len());
/// let maybe_some_string = Some(String::from("Hello, World!"));
/// // `Option::map` takes self *by value*, consuming `maybe_some_string`
/// let maybe_some_len = maybe_some_string.map(|s| s.len());
///
/// assert_eq!(maybe_some_len, Some(13));
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down
5 changes: 0 additions & 5 deletions src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,6 @@ pub fn commit_date_str() -> Option<&'static str> {
option_env!("CFG_VER_DATE")
}

pub fn build_date_str() -> Option<&'static str> {
option_env!("CFG_BUILD_DATE")
}

/// Prints version information and returns None on success or an error
/// message on panic.
pub fn version(binary: &str, matches: &getopts::Matches) {
Expand All @@ -498,7 +494,6 @@ pub fn version(binary: &str, matches: &getopts::Matches) {
println!("binary: {}", binary);
println!("commit-hash: {}", unw(commit_hash_str()));
println!("commit-date: {}", unw(commit_date_str()));
println!("build-date: {}", unw(build_date_str()));
println!("host: {}", config::host_triple());
println!("release: {}", unw(release_str()));
}
Expand Down
6 changes: 3 additions & 3 deletions src/librustdoc/html/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ nav.sub {
font-size: 1em;
position: relative;
}
/* Shift "where ..." part of method definition down a line */
.content .method .where { display: block; }
/* Shift "where ..." part of method or fn definition down a line */
.content .method .where, .content .fn .where { display: block; }
/* Bit of whitespace to indent it */
.content .method .where::before { content: ' '; }
.content .method .where::before, .content .fn .where::before { content: ' '; }

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

Expand Down
4 changes: 4 additions & 0 deletions src/libstd/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,8 @@ impl f32 {
///
/// assert_eq!(x.max(y), y);
/// ```
///
/// If one of the arguments is NaN, then the other argument is returned.
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
pub fn max(self, other: f32) -> f32 {
Expand All @@ -674,6 +676,8 @@ impl f32 {
///
/// assert_eq!(x.min(y), x);
/// ```
///
/// If one of the arguments is NaN, then the other argument is returned.
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
pub fn min(self, other: f32) -> f32 {
Expand Down
4 changes: 4 additions & 0 deletions src/libstd/num/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,8 @@ impl f64 {
///
/// assert_eq!(x.max(y), y);
/// ```
///
/// If one of the arguments is NaN, then the other argument is returned.
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
pub fn max(self, other: f64) -> f64 {
Expand All @@ -650,6 +652,8 @@ impl f64 {
///
/// assert_eq!(x.min(y), x);
/// ```
///
/// If one of the arguments is NaN, then the other argument is returned.
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
pub fn min(self, other: f64) -> f64 {
Expand Down