Skip to content

Commit c4f3915

Browse files
committed
---
yaml --- r: 232703 b: refs/heads/try c: 30fc4b7 h: refs/heads/master i: 232701: 6fe38b6 232699: 62b1ad9 232695: a0176bd 232687: 714ce54 232671: c042537 232639: 935e43a 232575: 92a5d6d 232447: 30ffd9d v: v3
1 parent 1bf9045 commit c4f3915

File tree

147 files changed

+1945
-2318
lines changed

Some content is hidden

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

147 files changed

+1945
-2318
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: 03c6b4ce84c63924c1e6085f87f326e6b0aad42d
4+
refs/heads/try: 30fc4b765ce378d65fa0bb1472ecda45e95527da
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/trpl/testing.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,63 @@ 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+
222279
# The `tests` module
223280

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

branches/try/src/liblibc/lib.rs

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ pub use types::os::arch::extra::*;
102102
pub use consts::os::c95::*;
103103
pub use consts::os::posix88::*;
104104
pub use consts::os::posix01::*;
105-
pub use consts::os::posix08::*;
106105
pub use consts::os::bsd44::*;
107106
pub use consts::os::extra::*;
108107

@@ -467,19 +466,18 @@ pub mod types {
467466
pub type off_t = i32;
468467
pub type dev_t = u32;
469468
pub type ino_t = u32;
470-
471469
pub type pid_t = i32;
472470
pub type uid_t = u32;
473471
pub type gid_t = u32;
474472
pub type useconds_t = u32;
475-
476473
pub type mode_t = u16;
477474
pub type ssize_t = i32;
478475
}
479-
#[cfg(any(all(any(target_arch = "arm", target_arch = "x86"),
480-
not(target_os = "android")),
476+
#[cfg(any(target_arch = "x86",
481477
target_arch = "le32",
482-
target_arch = "powerpc"))]
478+
target_arch = "powerpc",
479+
all(any(target_arch = "arm", target_arch = "x86"),
480+
not(target_os = "android"))))]
483481
pub mod posix01 {
484482
use types::os::arch::c95::{c_short, c_long, time_t};
485483
use types::os::arch::posix88::{dev_t, gid_t, ino_t};
@@ -525,13 +523,12 @@ pub mod types {
525523
pub __size: [u32; 9]
526524
}
527525
}
528-
529526
#[cfg(all(any(target_arch = "arm", target_arch = "x86"),
530-
target_os = "android"))]
527+
target_os = "android"))]
531528
pub mod posix01 {
532-
use types::os::arch::c95::{c_uchar, c_uint, c_ulong, c_long, time_t};
529+
use types::os::arch::c95::{c_uchar, c_uint, c_ulong, time_t};
533530
use types::os::arch::c99::{c_longlong, c_ulonglong};
534-
use types::os::arch::posix88::{uid_t, gid_t};
531+
use types::os::arch::posix88::{uid_t, gid_t, ino_t};
535532

536533
pub type nlink_t = u16;
537534
pub type blksize_t = u32;
@@ -541,15 +538,15 @@ pub mod types {
541538
#[derive(Copy, Clone)] pub struct stat {
542539
pub st_dev: c_ulonglong,
543540
pub __pad0: [c_uchar; 4],
544-
pub __st_ino: c_long,
541+
pub __st_ino: ino_t,
545542
pub st_mode: c_uint,
546543
pub st_nlink: c_uint,
547544
pub st_uid: uid_t,
548545
pub st_gid: gid_t,
549546
pub st_rdev: c_ulonglong,
550547
pub __pad3: [c_uchar; 4],
551548
pub st_size: c_longlong,
552-
pub st_blksize: c_ulong,
549+
pub st_blksize: blksize_t,
553550
pub st_blocks: c_ulonglong,
554551
pub st_atime: time_t,
555552
pub st_atime_nsec: c_ulong,
@@ -571,7 +568,6 @@ pub mod types {
571568
pub __size: [u32; 9]
572569
}
573570
}
574-
575571
#[cfg(any(target_arch = "mips",
576572
target_arch = "mipsel"))]
577573
pub mod posix01 {
@@ -3612,8 +3608,6 @@ pub mod consts {
36123608
pub const RUSAGE_THREAD: c_int = 1;
36133609
}
36143610
pub mod posix08 {
3615-
use types::os::arch::c95::c_int;
3616-
pub const O_CLOEXEC: c_int = 0x80000;
36173611
}
36183612
#[cfg(any(target_arch = "arm",
36193613
target_arch = "aarch64",
@@ -4273,15 +4267,7 @@ pub mod consts {
42734267
pub const RUSAGE_CHILDREN: c_int = -1;
42744268
pub const RUSAGE_THREAD: c_int = 1;
42754269
}
4276-
#[cfg(target_os = "freebsd")]
42774270
pub mod posix08 {
4278-
use types::os::arch::c95::c_int;
4279-
pub const O_CLOEXEC: c_int = 0x100000;
4280-
}
4281-
#[cfg(target_os = "dragonfly")]
4282-
pub mod posix08 {
4283-
use types::os::arch::c95::c_int;
4284-
pub const O_CLOEXEC: c_int = 0x20000;
42854271
}
42864272
pub mod bsd44 {
42874273
use types::os::arch::c95::c_int;
@@ -4724,15 +4710,7 @@ pub mod consts {
47244710
pub const RUSAGE_CHILDREN: c_int = -1;
47254711
pub const RUSAGE_THREAD: c_int = 1;
47264712
}
4727-
#[cfg(any(target_os = "bitrig", target_os = "openbsd"))]
47284713
pub mod posix08 {
4729-
use types::os::arch::c95::c_int;
4730-
pub const O_CLOEXEC: c_int = 0x10000;
4731-
}
4732-
#[cfg(target_os = "netbsd")]
4733-
pub mod posix08 {
4734-
use types::os::arch::c95::c_int;
4735-
pub const O_CLOEXEC: c_int = 0x400000;
47364714
}
47374715
pub mod bsd44 {
47384716
use types::os::arch::c95::c_int;
@@ -5170,8 +5148,6 @@ pub mod consts {
51705148
pub const RUSAGE_THREAD: c_int = 1;
51715149
}
51725150
pub mod posix08 {
5173-
use types::os::arch::c95::c_int;
5174-
pub const O_CLOEXEC: c_int = 0x1000000;
51755151
}
51765152
pub mod bsd44 {
51775153
use types::os::arch::c95::c_int;

branches/try/src/librustc/ast_map/blocks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ impl<'a> FnLikeNode<'a> {
191191
visit::FkItemFn(p.ident, p.generics, p.unsafety, p.constness, p.abi, p.vis)
192192
};
193193
let closure = |_: ClosureParts| {
194-
visit::FkClosure
194+
visit::FkFnBlock
195195
};
196196
let method = |_, ident, sig: &'a ast::MethodSig, vis, _, _| {
197197
visit::FkMethod(ident, sig, vis)

branches/try/src/librustc/ast_map/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use self::MapEntry::*;
1414

1515
use metadata::inline::InlinedItem;
1616
use metadata::inline::InlinedItem as II;
17-
use middle::def_id::DefId;
1817
use syntax::abi;
1918
use syntax::ast::*;
2019
use syntax::ast_util;
@@ -379,7 +378,7 @@ impl<'ast> Map<'ast> {
379378
match self.find_entry(parent) {
380379
Some(RootInlinedParent(&InlinedParent {ii: II::TraitItem(did, _), ..})) => did,
381380
Some(RootInlinedParent(&InlinedParent {ii: II::ImplItem(did, _), ..})) => did,
382-
_ => DefId::local(parent)
381+
_ => ast_util::local_def(parent)
383382
}
384383
}
385384

@@ -592,7 +591,7 @@ impl<'ast> Map<'ast> {
592591
}
593592

594593
pub fn def_id_span(&self, def_id: DefId, fallback: Span) -> Span {
595-
if def_id.is_local() {
594+
if def_id.krate == LOCAL_CRATE {
596595
self.opt_span(def_id.node).unwrap_or(fallback)
597596
} else {
598597
fallback

branches/try/src/librustc/diagnostics.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -731,14 +731,9 @@ type X = u32; // ok!
731731
"##,
732732

733733
E0133: r##"
734-
Using unsafe functionality, is potentially dangerous and disallowed
735-
by safety checks. Examples:
736-
737-
- Dereferencing raw pointers
738-
- Calling functions via FFI
739-
- Calling functions marked unsafe
740-
741-
These safety checks can be relaxed for a section of the code
734+
Using unsafe functionality, such as dereferencing raw pointers and calling
735+
functions via FFI or marked as unsafe, is potentially dangerous and disallowed
736+
by safety checks. These safety checks can be relaxed for a section of the code
742737
by wrapping the unsafe instructions with an `unsafe` block. For instance:
743738
744739
```

branches/try/src/librustc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ pub mod middle {
118118
pub mod dataflow;
119119
pub mod dead;
120120
pub mod def;
121-
pub mod def_id;
122121
pub mod dependency_format;
123122
pub mod effect;
124123
pub mod entry;

0 commit comments

Comments
 (0)