Skip to content

Commit e9e2dfe

Browse files
committed
---
yaml --- r: 233839 b: refs/heads/beta c: 71f39c1 h: refs/heads/master i: 233837: 5e1a5bc 233835: 2d23a2e 233831: f77c653 233823: d13dc9c v: v3
1 parent fcc97d9 commit e9e2dfe

File tree

149 files changed

+1249
-2737
lines changed

Some content is hidden

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

149 files changed

+1249
-2737
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: 2aa7f97c7a069c5650ab8eb7f31b8a2dae33c3f7
26+
refs/heads/beta: 71f39c1a2fd98f829a6087a7f4a47a857571493c
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 & 3 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

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/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/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/reference.md

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

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/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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Outputs:
134134
```text
135135
0: Content of line one
136136
1: Content of line two
137-
2: Content of line three
137+
2: Content of line tree
138138
3: Content of line four
139139
```
140140

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

Lines changed: 1 addition & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -120,26 +120,13 @@ And that's reflected in the summary line:
120120
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured
121121
```
122122

123-
We also get a non-zero status code. We can use `$?` on OS X and Linux:
123+
We also get a non-zero status code:
124124

125125
```bash
126126
$ echo $?
127127
101
128128
```
129129

130-
On Windows, if you’re using `cmd`:
131-
132-
```bash
133-
> echo %ERRORLEVEL%
134-
```
135-
136-
And if you’re using PowerShell:
137-
138-
```bash
139-
> echo $LASTEXITCODE # the code itself
140-
> echo $? # a boolean, fail or succeed
141-
```
142-
143130
This is useful if you want to integrate `cargo test` into other tooling.
144131

145132
We can invert our test's failure with another attribute: `should_panic`:
@@ -232,66 +219,6 @@ fn it_works() {
232219
This is a very common use of `assert_eq!`: call some function with
233220
some known arguments and compare it to the expected output.
234221

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

297224
There is one way in which our existing example is not idiomatic: it's

branches/beta/src/liballoc/arc.rs

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

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

branches/beta/src/liballoc/boxed.rs

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

5959
use core::any::Any;
60-
use core::borrow;
6160
use core::cmp::Ordering;
6261
use core::fmt;
6362
use core::hash::{self, Hash};
@@ -563,10 +562,3 @@ impl<T: Clone> Clone for Box<[T]> {
563562
}
564563
}
565564

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/beta/src/liballoc/rc.rs

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

161-
use core::borrow;
162161
use core::cell::Cell;
163162
use core::cmp::Ordering;
164163
use core::fmt;
@@ -1092,7 +1091,3 @@ mod tests {
10921091
assert_eq!(foo, foo.clone());
10931092
}
10941093
}
1095-
1096-
impl<T: ?Sized> borrow::Borrow<T> for Rc<T> {
1097-
fn borrow(&self) -> &T { &**self }
1098-
}

0 commit comments

Comments
 (0)