Skip to content

Commit 862d572

Browse files
committed
---
yaml --- r: 232731 b: refs/heads/try c: c408b78 h: refs/heads/master i: 232729: e12c843 232727: a9a8152 v: v3
1 parent 2cd006d commit 862d572

File tree

202 files changed

+2943
-4697
lines changed

Some content is hidden

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

202 files changed

+2943
-4697
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 80b971a9b86cf56eab5a6f707107175d4bf2bbe1
4+
refs/heads/try: c408b7863389aa2bdb253ffa363e693bcd02439f
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/configure

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,6 @@ 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"
@@ -1694,7 +1693,6 @@ putvar CFG_LIBDIR_RELATIVE
16941693
putvar CFG_DISABLE_MANAGE_SUBMODULES
16951694
putvar CFG_AARCH64_LINUX_ANDROID_NDK
16961695
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
1697-
putvar CFG_I686_LINUX_ANDROID_NDK
16981696
putvar CFG_MANDIR
16991697

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

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

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

branches/try/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/try/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/try/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/try/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/try/src/doc/reference.md

Lines changed: 2 additions & 7 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

@@ -2077,7 +2073,6 @@ The following configurations must be defined by the implementation:
20772073
* `target_pointer_width = "..."`. Target pointer width in bits. This is set
20782074
to `"32"` for targets with 32-bit pointers, and likewise set to `"64"` for
20792075
64-bit pointers.
2080-
* `test`. Enabled when compiling the test harness (using the `--test` flag).
20812076
* `unix`. See `target_family`.
20822077
* `windows`. See `target_family`.
20832078

branches/try/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/try/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/try/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/try/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/try/src/doc/trpl/glossary.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ let z = (8, 2, 6);
3838

3939
In the example above `x` and `y` have arity 2. `z` has arity 3.
4040

41-
### DST (Dynamically Sized Type)
42-
43-
A type without a statically known size or alignment. ([more info][link])
44-
45-
[link]: ../nomicon/exotic-sizes.html#dynamically-sized-types-(dsts)
46-
4741
### Expression
4842

4943
In computer programming, an expression is a combination of values, constants,

branches/try/src/doc/trpl/testing.md

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -219,66 +219,6 @@ fn it_works() {
219219
This is a very common use of `assert_eq!`: call some function with
220220
some known arguments and compare it to the expected output.
221221

222-
# The `ignore` attribute
223-
224-
Sometimes a few specific tests can be very time-consuming to execute. These
225-
can be disabled by default by using the `ignore` attribute:
226-
227-
```rust
228-
#[test]
229-
fn it_works() {
230-
assert_eq!(4, add_two(2));
231-
}
232-
233-
#[test]
234-
#[ignore]
235-
fn expensive_test() {
236-
// code that takes an hour to run
237-
}
238-
```
239-
240-
Now we run our tests and see that `it_works` is run, but `expensive_test` is
241-
not:
242-
243-
```bash
244-
$ cargo test
245-
Compiling adder v0.0.1 (file:///home/you/projects/adder)
246-
Running target/adder-91b3e234d4ed382a
247-
248-
running 2 tests
249-
test expensive_test ... ignored
250-
test it_works ... ok
251-
252-
test result: ok. 1 passed; 0 failed; 1 ignored; 0 measured
253-
254-
Doc-tests adder
255-
256-
running 0 tests
257-
258-
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
259-
```
260-
261-
The expensive tests can be run explicitly using `cargo test -- --ignored`:
262-
263-
```bash
264-
$ cargo test -- --ignored
265-
Running target/adder-91b3e234d4ed382a
266-
267-
running 1 test
268-
test expensive_test ... ok
269-
270-
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
271-
272-
Doc-tests adder
273-
274-
running 0 tests
275-
276-
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
277-
```
278-
279-
The `--ignored` argument is an argument to the test binary, and not to cargo,
280-
which is why the command is `cargo test -- --ignored`.
281-
282222
# The `tests` module
283223

284224
There is one way in which our existing example is not idiomatic: it's
@@ -415,8 +355,8 @@ Let's finally check out that third section: documentation tests.
415355
Nothing is better than documentation with examples. Nothing is worse than
416356
examples that don't actually work, because the code has changed since the
417357
documentation has been written. To this end, Rust supports automatically
418-
running examples in your documentation (**note:** this only works in library
419-
crates, not binary crates). Here's a fleshed-out `src/lib.rs` with examples:
358+
running examples in your documentation. Here's a fleshed-out `src/lib.rs`
359+
with examples:
420360

421361
```rust,ignore
422362
//! The `adder` crate provides functions that add numbers to other numbers.

branches/try/src/liballoc/arc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ use boxed::Box;
7373

7474
use core::sync::atomic;
7575
use core::sync::atomic::Ordering::{Relaxed, Release, Acquire, SeqCst};
76+
use core::borrow;
7677
use core::fmt;
7778
use core::cmp::Ordering;
7879
use core::mem::{align_of_val, size_of_val};
@@ -1109,3 +1110,7 @@ mod tests {
11091110
assert!(y.upgrade().is_none());
11101111
}
11111112
}
1113+
1114+
impl<T: ?Sized> borrow::Borrow<T> for Arc<T> {
1115+
fn borrow(&self) -> &T { &**self }
1116+
}

branches/try/src/liballoc/boxed.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ use heap;
5757
use raw_vec::RawVec;
5858

5959
use core::any::Any;
60+
use core::borrow;
6061
use core::cmp::Ordering;
6162
use core::fmt;
6263
use core::hash::{self, Hash};
@@ -562,3 +563,10 @@ impl<T: Clone> Clone for Box<[T]> {
562563
}
563564
}
564565

566+
impl<T: ?Sized> borrow::Borrow<T> for Box<T> {
567+
fn borrow(&self) -> &T { &**self }
568+
}
569+
570+
impl<T: ?Sized> borrow::BorrowMut<T> for Box<T> {
571+
fn borrow_mut(&mut self) -> &mut T { &mut **self }
572+
}

branches/try/src/liballoc/rc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ use boxed::Box;
158158
#[cfg(test)]
159159
use std::boxed::Box;
160160

161+
use core::borrow;
161162
use core::cell::Cell;
162163
use core::cmp::Ordering;
163164
use core::fmt;
@@ -1091,3 +1092,7 @@ mod tests {
10911092
assert_eq!(foo, foo.clone());
10921093
}
10931094
}
1095+
1096+
impl<T: ?Sized> borrow::Borrow<T> for Rc<T> {
1097+
fn borrow(&self) -> &T { &**self }
1098+
}

0 commit comments

Comments
 (0)