Skip to content

Commit c089f84

Browse files
committed
---
yaml --- r: 211836 b: refs/heads/auto c: 3af8e14 h: refs/heads/master v: v3
1 parent 5b7b43d commit c089f84

File tree

21 files changed

+68
-171
lines changed

21 files changed

+68
-171
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 46ebed55a675f86552e72bef52a84c7e03c7bf4e
13+
refs/heads/auto: 3af8e14cd13090d7630b40bf7515d228e3bd8fa9
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/configure

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,6 @@ valopt musl-root "/usr/local" "MUSL root installation directory"
593593
opt_nosave manage-submodules 1 "let the build manage the git submodules"
594594
opt_nosave clang 0 "prefer clang to gcc for building the runtime"
595595
opt_nosave jemalloc 1 "build liballoc with jemalloc"
596-
opt elf-tls 1 "elf thread local storage on platforms where supported"
597596

598597
valopt_nosave prefix "/usr/local" "set installation prefix"
599598
valopt_nosave local-rust-root "/usr/local" "set prefix for local rust binary"

branches/auto/mk/crates.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,3 @@ TOOL_INPUTS_$(1) := $$(call rwildcard,$$(dir $$(TOOL_SOURCE_$(1))),*.rs)
150150
endef
151151

152152
$(foreach crate,$(TOOLS),$(eval $(call RUST_TOOL,$(crate))))
153-
154-
ifdef CFG_DISABLE_ELF_TLS
155-
RUSTFLAGS_std := --cfg no_elf_tls
156-
endif

branches/auto/mk/main.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ 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+
7780
# Windows exe's need numeric versions - don't use anything but
7881
# numbers and dots here
7982
CFG_VERSION_WIN = $(CFG_RELEASE_NUM)
@@ -331,6 +334,7 @@ endif
331334
ifdef CFG_VER_HASH
332335
export CFG_VER_HASH
333336
endif
337+
export CFG_BUILD_DATE
334338
export CFG_VERSION
335339
export CFG_VERSION_WIN
336340
export CFG_RELEASE

branches/auto/mk/tests.mk

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,24 +172,23 @@ check: check-sanitycheck cleantmptestlogs cleantestlibs all check-stage2 tidy
172172
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
173173

174174
# As above but don't bother running tidy.
175-
check-notidy: check-sanitycheck cleantmptestlogs cleantestlibs all check-stage2
175+
check-notidy: cleantmptestlogs cleantestlibs all check-stage2
176176
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
177177

178178
# A slightly smaller set of tests for smoke testing.
179-
check-lite: check-sanitycheck cleantestlibs cleantmptestlogs \
179+
check-lite: cleantestlibs cleantmptestlogs \
180180
$(foreach crate,$(TEST_TARGET_CRATES),check-stage2-$(crate)) \
181181
check-stage2-rpass check-stage2-rpass-valgrind \
182182
check-stage2-rfail check-stage2-cfail check-stage2-pfail check-stage2-rmake
183183
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
184184

185185
# Only check the 'reference' tests: rpass/cfail/rfail/rmake.
186-
check-ref: check-sanitycheck cleantestlibs cleantmptestlogs check-stage2-rpass \
187-
check-stage2-rpass-valgrind check-stage2-rfail check-stage2-cfail check-stage2-pfail \
188-
check-stage2-rmake
186+
check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass check-stage2-rpass-valgrind \
187+
check-stage2-rfail check-stage2-cfail check-stage2-pfail check-stage2-rmake
189188
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
190189

191190
# Only check the docs.
192-
check-docs: check-sanitycheck cleantestlibs cleantmptestlogs check-stage2-docs
191+
check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
193192
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
194193

195194
# Some less critical tests that are not prone to breakage.

branches/auto/src/doc/index.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,3 @@ 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-

branches/auto/src/doc/trpl/guessing-game.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Finally, Cargo generated a ‘Hello, world!’ for us. Check out `src/main.rs`:
3838

3939
```rust
4040
fn main() {
41-
println!("Hello, world!");
41+
println!("Hello, world!")
4242
}
4343
```
4444

@@ -362,7 +362,7 @@ everything that follows it is part of it, until the next section starts.
362362
Cargo uses the dependencies section to know what dependencies on external
363363
crates you have, and what versions you require. In this case, we’ve used version `0.3.0`.
364364
Cargo understands [Semantic Versioning][semver], which is a standard for writing version
365-
numbers. If we wanted to use the latest version we could use `*` or we could use a range
365+
numbers. If we wanted to use the latest version we could use `*` or we could use a range
366366
of versions. [Cargo’s documentation][cargodoc] contains more details.
367367

368368
[semver]: http://semver.org

branches/auto/src/doc/trpl/mutability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ philosophy, memory safety, and the mechanism by which Rust guarantees it, the
8989
> * exactly one mutable reference (`&mut T`)
9090
9191
[ownership]: ownership.html
92-
[borrowing]: references-and-borrowing.html#borrowing
92+
[borrowing]: borrowing.html#The-Rules
9393

9494
So, that’s the real definition of ‘immutability’: is this safe to have two
9595
pointers to? In `Arc<T>`’s case, yes: the mutation is entirely contained inside

branches/auto/src/doc/trpl/raw-pointers.md

Lines changed: 1 addition & 1 deletion
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*`, respectively. For more about this use, consult the
80+
C’s `const T*` and `T*`, respectfully. For more about this use, consult the
8181
[FFI chapter][ffi].
8282

8383
[ffi]: ffi.html

branches/auto/src/etc/check-sanitycheck.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@
1111
# except according to those terms.
1212

1313
import os
14-
import subprocess
1514
import sys
1615
import functools
1716

1817
STATUS = 0
1918

19+
2020
def error_unless_permitted(env_var, message):
2121
global STATUS
2222
if not os.getenv(env_var):
2323
sys.stderr.write(message)
2424
STATUS = 1
2525

26+
2627
def only_on(platforms):
2728
def decorator(func):
2829
@functools.wraps(func)
@@ -32,7 +33,8 @@ def inner():
3233
return inner
3334
return decorator
3435

35-
@only_on(['linux', 'darwin', 'freebsd', 'openbsd'])
36+
37+
@only_on(('linux', 'darwin', 'freebsd', 'openbsd'))
3638
def check_rlimit_core():
3739
import resource
3840
soft, hard = resource.getrlimit(resource.RLIMIT_CORE)
@@ -43,14 +45,8 @@ def check_rlimit_core():
4345
set ALLOW_NONZERO_RLIMIT_CORE to ignore this warning
4446
""" % (soft))
4547

46-
@only_on(['win32'])
47-
def check_console_code_page():
48-
if '65001' not in subprocess.check_output(['cmd', '/c', 'chcp']):
49-
sys.stderr.write('Warning: the console output code page is not UTF-8, \
50-
some tests may fail. Use `cmd /c "chcp 65001"` to setup UTF-8 code page.\n')
5148

5249
def main():
53-
check_console_code_page()
5450
check_rlimit_core()
5551

5652
if __name__ == '__main__':

branches/auto/src/libcollections/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//! You can get a non-`'static` `&str` by taking a slice of a `String`:
3131
//!
3232
//! ```
33-
//! let some_string = "Hello, world.".to_string();
33+
//! # let some_string = "Hello, world.".to_string();
3434
//! let s = &some_string;
3535
//! ```
3636
//!

branches/auto/src/libcollections/string.rs

Lines changed: 1 addition & 2 deletions
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")]

branches/auto/src/libcore/option.rs

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ impl<T> Option<T> {
320320
///
321321
/// ```{.should_panic}
322322
/// let x: Option<&str> = None;
323-
/// x.expect("the world is ending"); // panics with `the world is ending`
323+
/// x.expect("the world is ending"); // panics with `world is ending`
324324
/// ```
325325
#[inline]
326326
#[stable(feature = "rust1", since = "1.0.0")]
@@ -409,11 +409,9 @@ impl<T> Option<T> {
409409
/// Convert an `Option<String>` into an `Option<usize>`, consuming the original:
410410
///
411411
/// ```
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));
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());
417415
/// ```
418416
#[inline]
419417
#[stable(feature = "rust1", since = "1.0.0")]
@@ -424,8 +422,7 @@ impl<T> Option<T> {
424422
}
425423
}
426424

427-
/// Applies a function to the contained value (if any),
428-
/// or returns a `default` (if not).
425+
/// Applies a function to the contained value or returns a default.
429426
///
430427
/// # Examples
431428
///
@@ -438,15 +435,14 @@ impl<T> Option<T> {
438435
/// ```
439436
#[inline]
440437
#[stable(feature = "rust1", since = "1.0.0")]
441-
pub fn map_or<U, F: FnOnce(T) -> U>(self, default: U, f: F) -> U {
438+
pub fn map_or<U, F: FnOnce(T) -> U>(self, def: U, f: F) -> U {
442439
match self {
443440
Some(t) => f(t),
444-
None => default,
441+
None => def
445442
}
446443
}
447444

448-
/// Applies a function to the contained value (if any),
449-
/// or computes a `default` (if not).
445+
/// Applies a function to the contained value or computes a default.
450446
///
451447
/// # Examples
452448
///
@@ -461,10 +457,10 @@ impl<T> Option<T> {
461457
/// ```
462458
#[inline]
463459
#[stable(feature = "rust1", since = "1.0.0")]
464-
pub fn map_or_else<U, D: FnOnce() -> U, F: FnOnce(T) -> U>(self, default: D, f: F) -> U {
460+
pub fn map_or_else<U, D: FnOnce() -> U, F: FnOnce(T) -> U>(self, def: D, f: F) -> U {
465461
match self {
466462
Some(t) => f(t),
467-
None => default()
463+
None => def()
468464
}
469465
}
470466

branches/auto/src/librustc/diagnostics.rs

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -176,38 +176,6 @@ for the entire lifetime of a program. Creating a boxed value allocates memory on
176176
the heap at runtime, and therefore cannot be done at compile time.
177177
"##,
178178

179-
E0011: r##"
180-
Initializers for constants and statics are evaluated at compile time.
181-
User-defined operators rely on user-defined functions, which cannot be evaluated
182-
at compile time.
183-
184-
Bad example:
185-
186-
```
187-
use std::ops::Index;
188-
189-
struct Foo { a: u8 }
190-
191-
impl Index<u8> for Foo {
192-
type Output = u8;
193-
194-
fn index<'a>(&'a self, idx: u8) -> &'a u8 { &self.a }
195-
}
196-
197-
const a: Foo = Foo { a: 0u8 };
198-
const b: u8 = a[0]; // Index trait is defined by the user, bad!
199-
```
200-
201-
Only operators on builtin types are allowed.
202-
203-
Example:
204-
205-
```
206-
const a: &'static [i32] = &[1, 2, 3];
207-
const b: i32 = a[0]; // Good!
208-
```
209-
"##,
210-
211179
E0013: r##"
212180
Static and const variables can refer to other const variables. But a const
213181
variable cannot refer to a static variable. For example, `Y` cannot refer to `X`
@@ -931,6 +899,7 @@ static mut BAR: Option<Vec<i32>> = None;
931899

932900

933901
register_diagnostics! {
902+
E0011,
934903
E0014,
935904
E0016,
936905
E0017,

branches/auto/src/librustc_driver/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,10 @@ 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+
486490
/// Prints version information and returns None on success or an error
487491
/// message on panic.
488492
pub fn version(binary: &str, matches: &getopts::Matches) {
@@ -494,6 +498,7 @@ pub fn version(binary: &str, matches: &getopts::Matches) {
494498
println!("binary: {}", binary);
495499
println!("commit-hash: {}", unw(commit_hash_str()));
496500
println!("commit-date: {}", unw(commit_date_str()));
501+
println!("build-date: {}", unw(build_date_str()));
497502
println!("host: {}", config::host_triple());
498503
println!("release: {}", unw(release_str()));
499504
}

branches/auto/src/librustdoc/html/static/main.css

Lines changed: 3 additions & 3 deletions
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 or fn definition down a line */
342-
.content .method .where, .content .fn .where { display: block; }
341+
/* Shift "where ..." part of method definition down a line */
342+
.content .method .where { display: block; }
343343
/* Bit of whitespace to indent it */
344-
.content .method .where::before, .content .fn .where::before { content: ' '; }
344+
.content .method .where::before { content: ' '; }
345345

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

branches/auto/src/libstd/io/error.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,6 @@ pub enum ErrorKind {
9595
/// A parameter was incorrect.
9696
#[stable(feature = "rust1", since = "1.0.0")]
9797
InvalidInput,
98-
/// Data not valid for the operation were encountered.
99-
///
100-
/// Unlike `InvalidInput`, this typically means that the operation
101-
/// parameters were valid, however the error was caused by malformed
102-
/// input data.
103-
#[stable(feature = "io_invalid_data", since = "1.2.0")]
104-
InvalidData,
10598
/// The I/O operation's timeout expired, causing it to be canceled.
10699
#[stable(feature = "rust1", since = "1.0.0")]
107100
TimedOut,

branches/auto/src/libstd/io/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fn append_to_string<F>(buf: &mut String, f: F) -> Result<usize>
8080
let ret = f(g.s);
8181
if str::from_utf8(&g.s[g.len..]).is_err() {
8282
ret.and_then(|_| {
83-
Err(Error::new(ErrorKind::InvalidData,
83+
Err(Error::new(ErrorKind::InvalidInput,
8484
"stream did not contain valid UTF-8"))
8585
})
8686
} else {

branches/auto/src/libstd/sys/windows/stdio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,5 +170,5 @@ impl Output {
170170
}
171171

172172
fn invalid_encoding() -> io::Error {
173-
io::Error::new(io::ErrorKind::InvalidData, "text was not valid unicode")
173+
io::Error::new(io::ErrorKind::InvalidInput, "text was not valid unicode")
174174
}

0 commit comments

Comments
 (0)