Skip to content

Commit 414d711

Browse files
committed
---
yaml --- r: 233849 b: refs/heads/beta c: dacf272 h: refs/heads/master i: 233847: 35587b4 v: v3
1 parent 0743b16 commit 414d711

File tree

409 files changed

+6375
-11722
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

409 files changed

+6375
-11722
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 05cc464d90f0189b776859c56c87db2e99cdbd87
26+
refs/heads/beta: dacf2725ec6230e4b99486fd8f87cc9ab5ad995c
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sudo: false
2020
before_script:
2121
- ./configure --enable-ccache
2222
script:
23-
- make tidy && make check -j4
23+
- make tidy check -j4
2424

2525
env:
2626
- CXX=/usr/bin/g++-4.7

branches/beta/README.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ Read ["Installing Rust"] from [The Book].
6565
tools.
6666
6767
```sh
68-
# Update package mirrors (may be needed if you have a fresh install of MSYS2)
69-
$ pacman -Sy pacman-mirrors
70-
7168
# Choose one based on platform:
7269
$ pacman -S mingw-w64-i686-toolchain
7370
$ pacman -S mingw-w64-x86_64-toolchain
@@ -85,28 +82,6 @@ Read ["Installing Rust"] from [The Book].
8582
$ make && make install
8683
```
8784

88-
## Building Documentation
89-
90-
If you’d like to build the documentation, it’s almost the same:
91-
92-
```sh
93-
./configure
94-
$ make docs
95-
```
96-
97-
Building the documentation requires building the compiler, so the above
98-
details will apply. Once you have the compiler built, you can
99-
100-
```sh
101-
$ make docs NO_REBUILD=1
102-
```
103-
104-
To make sure you don’t re-build the compiler because you made a change
105-
to some documentation.
106-
107-
The generated documentation will appear in a top-level `doc` directory,
108-
created by the `make` rule.
109-
11085
## Notes
11186

11287
Since the Rust compiler is written in Rust, it must be built by a

branches/beta/configure

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -602,16 +602,11 @@ valopt python "" "set path to python"
602602
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
603603
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
604604
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path (deprecated)"
605-
valopt i686-linux-android-ndk "" "i686-linux-android NDK standalone path"
606605
valopt arm-linux-androideabi-ndk "" "arm-linux-androideabi NDK standalone path"
607606
valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
608607
valopt release-channel "dev" "the name of the release channel to build"
609608
valopt musl-root "/usr/local" "MUSL root installation directory"
610609

611-
# Used on systems where "cc" and "ar" are unavailable
612-
valopt default-linker "cc" "the default linker"
613-
valopt default-ar "ar" "the default ar"
614-
615610
# Many of these are saved below during the "writing configuration" step
616611
# (others are conditionally saved).
617612
opt_nosave manage-submodules 1 "let the build manage the git submodules"
@@ -1694,7 +1689,6 @@ putvar CFG_LIBDIR_RELATIVE
16941689
putvar CFG_DISABLE_MANAGE_SUBMODULES
16951690
putvar CFG_AARCH64_LINUX_ANDROID_NDK
16961691
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
1697-
putvar CFG_I686_LINUX_ANDROID_NDK
16981692
putvar CFG_MANDIR
16991693

17001694
# Avoid spurious warnings from clang by feeding it original source on

branches/beta/man/rustc.1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ look for anything here (the default)
4141
.RE
4242
.TP
4343
\fB\-l\fR [\fIKIND\fR=]\fINAME\fR
44-
Link the generated crate(s) to the specified library \fINAME\fR.
44+
Link the generated crate(s) to the specified native library \fINAME\fR.
4545
The optional \fIKIND\fR can be one of \fIstatic\fR, \fIdylib\fR, or
4646
\fIframework\fR.
4747
If omitted, \fIdylib\fR is assumed.
@@ -113,8 +113,7 @@ Print version info and exit.
113113
Use verbose output.
114114
.TP
115115
\fB\-\-extern\fR \fINAME\fR=\fIPATH\fR
116-
Specify where an external rust library is located. These should match
117-
\fIextern\fR declarations in the crate's source code.
116+
Specify where an external rust library is located.
118117
.TP
119118
\fB\-\-sysroot\fR \fIPATH\fR
120119
Override the system root.

branches/beta/mk/cfg/i686-linux-android.mk

Lines changed: 0 additions & 25 deletions
This file was deleted.

branches/beta/mk/crates.mk

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ TARGET_CRATES := libc std flate arena term \
5656
alloc_system
5757
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
59-
rustc_data_structures rustc_platform_intrinsics
59+
rustc_data_structures
6060
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
6161
TOOLS := compiletest rustdoc rustc rustbook error-index-generator
6262

@@ -74,16 +74,15 @@ DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_bo
7474
rustc_trans rustc_privacy rustc_lint
7575

7676
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
77-
log syntax serialize rustc_llvm rustc_platform_intrinsics
78-
DEPS_rustc_typeck := rustc syntax rustc_platform_intrinsics
77+
log syntax serialize rustc_llvm
78+
DEPS_rustc_typeck := rustc syntax
7979
DEPS_rustc_borrowck := rustc log graphviz syntax
8080
DEPS_rustc_resolve := rustc log syntax
8181
DEPS_rustc_privacy := rustc log syntax
8282
DEPS_rustc_lint := rustc log syntax
8383
DEPS_rustc := syntax flate arena serialize getopts rbml \
8484
log graphviz rustc_llvm rustc_back rustc_data_structures
8585
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
86-
DEPS_rustc_platform_intrinsics := rustc rustc_llvm
8786
DEPS_rustc_back := std syntax rustc_llvm flate log libc
8887
DEPS_rustc_data_structures := std log serialize
8988
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \

branches/beta/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ LLVM_VERSION_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --version)
294294
LLVM_BINDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --bindir)
295295
LLVM_INCDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --includedir)
296296
LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir)
297-
LLVM_LIBDIR_RUSTFLAGS_$(1)=-L native="$$(LLVM_LIBDIR_$(1))"
297+
LLVM_LIBDIR_RUSTFLAGS_$(1)=-L "$$(LLVM_LIBDIR_$(1))"
298298
LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags)
299299
ifeq ($$(findstring freebsd,$(1)),freebsd)
300300
# On FreeBSD, it may search wrong headers (that are for pre-installed LLVM),

branches/beta/mk/target.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
# this exists can be found on issue #2400
1414
export CFG_COMPILER_HOST_TRIPLE
1515

16-
# Used as defaults for the runtime ar and cc tools
17-
export CFG_DEFAULT_LINKER
18-
export CFG_DEFAULT_AR
19-
2016
# The standard libraries should be held up to a higher standard than any old
2117
# code, make sure that these common warnings are denied by default. These can
2218
# be overridden during development temporarily. For stage0, we allow warnings

branches/beta/src/compiletest/compiletest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#![feature(str_char)]
2020
#![feature(test)]
2121
#![feature(vec_push_all)]
22-
#![feature(path_components_peek)]
2322

2423
#![deny(warnings)]
2524

branches/beta/src/compiletest/runtest.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use std::fs::{self, File};
2525
use std::io::BufReader;
2626
use std::io::prelude::*;
2727
use std::net::TcpStream;
28-
use std::path::{Path, PathBuf, Component};
28+
use std::path::{Path, PathBuf};
2929
use std::process::{Command, Output, ExitStatus};
3030

3131
pub fn run(config: Config, testfile: &Path) {
@@ -952,9 +952,6 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError>,
952952
// filename:line1:col1: line2:col2: *warning:* msg
953953
// where line1:col1: is the starting point, line2:col2:
954954
// is the ending point, and * represents ANSI color codes.
955-
//
956-
// This pattern is ambiguous on windows, because filename may contain
957-
// a colon, so any path prefix must be detected and removed first.
958955
for line in proc_res.stderr.lines() {
959956
let mut was_expected = false;
960957
let mut prev = 0;
@@ -1009,16 +1006,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError>,
10091006
}
10101007
}
10111008

1012-
fn is_compiler_error_or_warning(mut line: &str) -> bool {
1013-
// Remove initial prefix which may contain a colon
1014-
let mut components = Path::new(line).components();
1015-
if let Some(Component::Prefix(_)) = components.peek() {
1016-
components.next();
1017-
}
1018-
1019-
// Safe as path was originally constructed from a &str ^
1020-
line = components.as_path().to_str().unwrap();
1021-
1009+
fn is_compiler_error_or_warning(line: &str) -> bool {
10221010
let mut i = 0;
10231011
return
10241012
scan_until_char(line, ':', &mut i) &&

branches/beta/src/doc/nomicon/coercions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Coercion is allowed between the following types:
2222
for all pointer types (including smart pointers like Box and Rc). Unsize is
2323
only implemented automatically, and enables the following transformations:
2424

25-
* `[T; n]` => `[T]`
25+
* `[T, ..n]` => `[T]`
2626
* `T` => `Trait` where `T: Trait`
2727
* `Foo<..., T, ...>` => `Foo<..., U, ...>` where:
2828
* `T: Unsize<U>`

branches/beta/src/doc/nomicon/leaking.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ impl<T> Rc<T> {
155155
impl<T> Drop for Rc<T> {
156156
fn drop(&mut self) {
157157
unsafe {
158+
let inner = &mut ;
158159
(*self.ptr).ref_count -= 1;
159160
if (*self.ptr).ref_count == 0 {
160161
// drop the data and then free it

branches/beta/src/doc/nomicon/safe-unsafe-meaning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ unsafe impl UnsafeOrd for MyType {
125125
But it's probably not the implementation you want.
126126

127127
Rust has traditionally avoided making traits unsafe because it makes Unsafe
128-
pervasive, which is not desirable. The reason Send and Sync are unsafe is because thread
128+
pervasive, which is not desirable. Send and Sync are unsafe is because thread
129129
safety is a *fundamental property* that unsafe code cannot possibly hope to defend
130130
against in the same way it would defend against a bad Ord implementation. The
131131
only way to possibly defend against thread-unsafety would be to *not use

branches/beta/src/doc/reference.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,7 @@ fn draw_twice<T: Shape>(surface: Surface, sh: T) {
14521452
}
14531453
```
14541454

1455-
Traits also define a [trait object](#trait-objects) with the same
1455+
Traits also define an [trait object](#trait-objects) with the same
14561456
name as the trait. Values of this type are created by coercing from a
14571457
pointer of some specific type to a pointer of trait type. For example,
14581458
`&T` could be coerced to `&Shape` if `T: Shape` holds (and similarly
@@ -1881,15 +1881,11 @@ type int8_t = i8;
18811881
- `no_start` - disable linking to the `native` crate, which specifies the
18821882
"start" language item.
18831883
- `no_std` - disable linking to the `std` crate.
1884-
- `plugin` - load a list of named crates as compiler plugins, e.g.
1884+
- `plugin` load a list of named crates as compiler plugins, e.g.
18851885
`#![plugin(foo, bar)]`. Optional arguments for each plugin,
18861886
i.e. `#![plugin(foo(... args ...))]`, are provided to the plugin's
18871887
registrar function. The `plugin` feature gate is required to use
18881888
this attribute.
1889-
- `recursion_limit` - Sets the maximum depth for potentially
1890-
infinitely-recursive compile-time operations like
1891-
auto-dereference or macro expansion. The default is
1892-
`#![recursion_limit="64"]`.
18931889

18941890
### Module-only attributes
18951891

@@ -2063,11 +2059,6 @@ The following configurations must be defined by the implementation:
20632059
`"mips"`, `"powerpc"`, `"arm"`, or `"aarch64"`.
20642060
* `target_endian = "..."`. Endianness of the target CPU, either `"little"` or
20652061
`"big"`.
2066-
* `target_env = ".."` - an option provided by the compiler by default
2067-
describing the runtime environment of the target platform. Some examples of
2068-
this are `musl` for builds targeting the MUSL libc implementation, `msvc` for
2069-
Windows builds targeting MSVC, and `gnu` frequently the rest of the time. This
2070-
option may also be blank on some platforms.
20712062
* `target_family = "..."`. Operating system family of the target, e. g.
20722063
`"unix"` or `"windows"`. The value of this configuration option is defined
20732064
as a configuration itself, like `unix` or `windows`.
@@ -2077,7 +2068,6 @@ The following configurations must be defined by the implementation:
20772068
* `target_pointer_width = "..."`. Target pointer width in bits. This is set
20782069
to `"32"` for targets with 32-bit pointers, and likewise set to `"64"` for
20792070
64-bit pointers.
2080-
* `test`. Enabled when compiling the test harness (using the `--test` flag).
20812071
* `unix`. See `target_family`.
20822072
* `windows`. See `target_family`.
20832073

branches/beta/src/doc/trpl/concurrency.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,14 +343,12 @@ threads as a simple isolation mechanism:
343343
```rust
344344
use std::thread;
345345

346-
let handle = thread::spawn(move || {
346+
let result = thread::spawn(move || {
347347
panic!("oops!");
348-
});
349-
350-
let result = handle.join();
348+
}).join();
351349

352350
assert!(result.is_err());
353351
```
354352

355-
`Thread.join()` gives us a `Result` back, which allows us to check if the thread
353+
Our `Thread` gives us a `Result` back, which allows us to check if the thread
356354
has panicked or not.

branches/beta/src/doc/trpl/crates-and-modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ $ ls target/debug
115115
build deps examples libphrases-a7448e02a0468eaa.rlib native
116116
```
117117

118-
`libphrases-hash.rlib` is the compiled crate. Before we see how to use this
118+
`libphrase-hash.rlib` is the compiled crate. Before we see how to use this
119119
crate from another crate, let’s break it up into multiple files.
120120

121121
# Multiple file crates

branches/beta/src/doc/trpl/documentation.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ hello.rs:4 }
7373
```
7474

7575
This [unfortunate error](https://github.com/rust-lang/rust/issues/22547) is
76-
correct: documentation comments apply to the thing after them, and there's
77-
nothing after that last comment.
76+
correct: documentation comments apply to the thing after them, and there's no
77+
thing after that last comment.
7878

7979
[rc-new]: https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new
8080

@@ -196,10 +196,10 @@ This will highlight according to whatever language you're showing off.
196196
If you're just showing plain text, choose `text`.
197197

198198
It's important to choose the correct annotation here, because `rustdoc` uses it
199-
in an interesting way: It can be used to actually test your examples in a
200-
library crate, so that they don't get out of date. If you have some C code but
201-
`rustdoc` thinks it's Rust because you left off the annotation, `rustdoc` will
202-
complain when trying to generate the documentation.
199+
in an interesting way: It can be used to actually test your examples, so that
200+
they don't get out of date. If you have some C code but `rustdoc` thinks it's
201+
Rust because you left off the annotation, `rustdoc` will complain when trying to
202+
generate the documentation.
203203

204204
## Documentation as tests
205205

@@ -377,8 +377,8 @@ $ rustdoc --test path/to/my/crate/root.rs
377377
$ cargo test
378378
```
379379

380-
That's right, `cargo test` tests embedded documentation too. **However,
381-
`cargo test` will not test binary crates, only library ones.** This is
380+
That's right, `cargo test` tests embedded documentation too. However,
381+
`cargo test` will not test binary crates, only library ones. This is
382382
due to the way `rustdoc` works: it links against the library to be tested,
383383
but with a binary, there’s nothing to link to.
384384

branches/beta/src/doc/trpl/error-handling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ Because these kinds of situations are relatively rare, use panics sparingly.
208208

209209
In certain circumstances, even though a function may fail, we may want to treat
210210
it as a panic instead. For example, `io::stdin().read_line(&mut buffer)` returns
211-
a `Result<usize>`, which can indicate an error if one occurs when reading the line.
212-
This allows us to handle and possibly recover from errors.
211+
a `Result<usize>`, when there is an error reading the line. This allows us to
212+
handle and possibly recover from error.
213213

214214
If we don't want to handle this error, and would rather just abort the program,
215215
we can use the `unwrap()` method:

branches/beta/src/doc/trpl/ffi.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -496,11 +496,9 @@ strings are not terminated with `\0`. If you need a NUL-terminated string for
496496
interoperability with C, you should use the `CString` type in the `std::ffi`
497497
module.
498498

499-
The [`libc` crate on crates.io][libc] includes type aliases and function
500-
definitions for the C standard library in the `libc` module, and Rust links
501-
against `libc` and `libm` by default.
502-
503-
[libc]: https://crates.io/crates/libc
499+
The standard library includes type aliases and function definitions for the C
500+
standard library in the `libc` module, and Rust links against `libc` and `libm`
501+
by default.
504502

505503
# The "nullable pointer optimization"
506504

0 commit comments

Comments
 (0)