Skip to content

Commit 756e3a6

Browse files
committed
---
yaml --- r: 181611 b: refs/heads/snap-stage3 c: 4acc483 h: refs/heads/master i: 181609: 7eae5e1 181607: 53846f7 v: v3
1 parent 96a32df commit 756e3a6

File tree

146 files changed

+143
-176
lines changed

Some content is hidden

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

146 files changed

+143
-176
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: 6c065fc8cb036785f61ff03e05c1563cbb2dd081
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: c07ec507e26ed5ecde63bf7138b09592d9001fb2
4+
refs/heads/snap-stage3: 4acc48310678f67461c8db15f6f9351577a53f09
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/README.md

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,14 @@ Read ["Installing Rust"][install] from [The Book][trpl].
1919
* `curl`
2020
* `git`
2121

22-
2. Download and build Rust:
23-
24-
You can either download a [tarball] or build directly from the [repo].
25-
26-
To build from the [tarball] do:
27-
28-
$ curl -O https://static.rust-lang.org/dist/rustc-nightly-src.tar.gz
29-
$ tar -xzf rustc-nightly-src.tar.gz
30-
$ cd rustc-nightly
31-
32-
Or to build from the [repo] do:
22+
2. Clone the [source] with git:
3323

3424
$ git clone https://github.com/rust-lang/rust.git
3525
$ cd rust
3626

37-
Now that you have Rust's source code, you can configure and build it:
27+
[source]: https://github.com/rust-lang/rust
28+
29+
3. Build and install:
3830

3931
$ ./configure
4032
$ make && make install
@@ -72,9 +64,6 @@ $ pacman -S base-devel
7264
$ ./configure
7365
$ make && make install
7466

75-
[repo]: https://github.com/rust-lang/rust
76-
[tarball]: https://static.rust-lang.org/dist/rustc-nightly-src.tar.gz
77-
7867
## Notes
7968

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

branches/snap-stage3/configure

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,6 @@ do
10561056
make_dir $h/test/run-pass-fulldeps
10571057
make_dir $h/test/run-fail
10581058
make_dir $h/test/compile-fail
1059-
make_dir $h/test/parse-fail
10601059
make_dir $h/test/compile-fail-fulldeps
10611060
make_dir $h/test/bench
10621061
make_dir $h/test/perf

branches/snap-stage3/mk/tests.mk

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,12 @@ check-notidy: cleantmptestlogs cleantestlibs all check-stage2
174174
check-lite: cleantestlibs cleantmptestlogs \
175175
$(foreach crate,$(TEST_TARGET_CRATES),check-stage2-$(crate)) \
176176
check-stage2-rpass check-stage2-rpass-valgrind \
177-
check-stage2-rfail check-stage2-cfail check-stage2-pfail check-stage2-rmake
177+
check-stage2-rfail check-stage2-cfail check-stage2-rmake
178178
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
179179

180180
# Only check the 'reference' tests: rpass/cfail/rfail/rmake.
181181
check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass check-stage2-rpass-valgrind \
182-
check-stage2-rfail check-stage2-cfail check-stage2-pfail check-stage2-rmake
182+
check-stage2-rfail check-stage2-cfail check-stage2-rmake
183183
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
184184

185185
# Only check the docs.
@@ -291,7 +291,6 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
291291
check-stage$(1)-T-$(2)-H-$(3)-rpass-exec \
292292
check-stage$(1)-T-$(2)-H-$(3)-rfail-exec \
293293
check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \
294-
check-stage$(1)-T-$(2)-H-$(3)-pfail-exec \
295294
check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \
296295
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
297296
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \
@@ -471,8 +470,7 @@ RPASS_VALGRIND_TESTS := $(RPASS_VALGRIND_RS)
471470
RPASS_FULL_TESTS := $(RPASS_FULL_RS)
472471
CFAIL_FULL_TESTS := $(CFAIL_FULL_RS)
473472
RFAIL_TESTS := $(RFAIL_RS)
474-
CFAIL_TESTS := $(CFAIL_RS)
475-
PFAIL_TESTS := $(PFAIL_RS)
473+
CFAIL_TESTS := $(CFAIL_RS) $(PFAIL_RS)
476474
BENCH_TESTS := $(BENCH_RS)
477475
PERF_TESTS := $(PERF_RS)
478476
PRETTY_TESTS := $(PRETTY_RS)
@@ -510,11 +508,6 @@ CTEST_BUILD_BASE_cfail = compile-fail
510508
CTEST_MODE_cfail = compile-fail
511509
CTEST_RUNTOOL_cfail = $(CTEST_RUNTOOL)
512510

513-
CTEST_SRC_BASE_pfail = parse-fail
514-
CTEST_BUILD_BASE_pfail = parse-fail
515-
CTEST_MODE_pfail = parse-fail
516-
CTEST_RUNTOOL_pfail = $(CTEST_RUNTOOL)
517-
518511
CTEST_SRC_BASE_bench = bench
519512
CTEST_BUILD_BASE_bench = bench
520513
CTEST_MODE_bench = run-pass
@@ -637,7 +630,6 @@ CTEST_DEPS_rpass-full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(CSREQ$(1)_T_$
637630
CTEST_DEPS_cfail-full_$(1)-T-$(2)-H-$(3) = $$(CFAIL_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))
638631
CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
639632
CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
640-
CTEST_DEPS_pfail_$(1)-T-$(2)-H-$(3) = $$(PFAIL_TESTS)
641633
CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
642634
CTEST_DEPS_perf_$(1)-T-$(2)-H-$(3) = $$(PERF_TESTS)
643635
CTEST_DEPS_debuginfo-gdb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_GDB_TESTS)
@@ -706,7 +698,7 @@ endif
706698

707699
endef
708700

709-
CTEST_NAMES = rpass rpass-valgrind rpass-full cfail-full rfail cfail pfail bench perf debuginfo-gdb debuginfo-lldb codegen
701+
CTEST_NAMES = rpass rpass-valgrind rpass-full cfail-full rfail cfail bench perf debuginfo-gdb debuginfo-lldb codegen
710702

711703
$(foreach host,$(CFG_HOST), \
712704
$(eval $(foreach target,$(CFG_TARGET), \
@@ -865,7 +857,6 @@ TEST_GROUPS = \
865857
cfail-full \
866858
rfail \
867859
cfail \
868-
pfail \
869860
bench \
870861
perf \
871862
rmake \

branches/snap-stage3/src/compiletest/common.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use std::str::FromStr;
1515
#[derive(Clone, Copy, PartialEq, Debug)]
1616
pub enum Mode {
1717
CompileFail,
18-
ParseFail,
1918
RunFail,
2019
RunPass,
2120
RunPassValgrind,
@@ -30,7 +29,6 @@ impl FromStr for Mode {
3029
fn from_str(s: &str) -> Result<Mode, ()> {
3130
match s {
3231
"compile-fail" => Ok(CompileFail),
33-
"parse-fail" => Ok(ParseFail),
3432
"run-fail" => Ok(RunFail),
3533
"run-pass" => Ok(RunPass),
3634
"run-pass-valgrind" => Ok(RunPassValgrind),
@@ -47,7 +45,6 @@ impl fmt::Display for Mode {
4745
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4846
fmt::Display::fmt(match *self {
4947
CompileFail => "compile-fail",
50-
ParseFail => "parse-fail",
5148
RunFail => "run-fail",
5249
RunPass => "run-pass",
5350
RunPassValgrind => "run-pass-valgrind",

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#![feature(test)]
2222
#![feature(unicode)]
2323
#![feature(env)]
24-
#![feature(core)]
2524

2625
#![deny(warnings)]
2726

@@ -73,7 +72,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
7372
reqopt("", "aux-base", "directory to find auxiliary test files", "PATH"),
7473
reqopt("", "stage-id", "the target-stage identifier", "stageN-TARGET"),
7574
reqopt("", "mode", "which sort of compile tests to run",
76-
"(compile-fail|parse-fail|run-fail|run-pass|run-pass-valgrind|pretty|debug-info)"),
75+
"(compile-fail|run-fail|run-pass|run-pass-valgrind|pretty|debug-info)"),
7776
optflag("", "ignored", "run tests marked as ignored"),
7877
optopt("", "runtool", "supervisor program to run tests under \
7978
(eg. emulator, valgrind)", "PROGRAM"),

branches/snap-stage3/src/compiletest/runtest.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use self::TargetLocation::*;
1212

1313
use common::Config;
14-
use common::{CompileFail, ParseFail, Pretty, RunFail, RunPass, RunPassValgrind, DebugInfoGdb};
14+
use common::{CompileFail, Pretty, RunFail, RunPass, RunPassValgrind, DebugInfoGdb};
1515
use common::{Codegen, DebugInfoLldb};
1616
use errors;
1717
use header::TestProps;
@@ -66,7 +66,6 @@ pub fn run_metrics(config: Config, testfile: String, mm: &mut MetricMap) {
6666
debug!("loaded props");
6767
match config.mode {
6868
CompileFail => run_cfail_test(&config, &props, &testfile),
69-
ParseFail => run_cfail_test(&config, &props, &testfile),
7069
RunFail => run_rfail_test(&config, &props, &testfile),
7170
RunPass => run_rpass_test(&config, &props, &testfile),
7271
RunPassValgrind => run_valgrind_test(&config, &props, &testfile),
@@ -89,7 +88,7 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
8988
let proc_res = compile_test(config, props, testfile);
9089

9190
if proc_res.status.success() {
92-
fatal_proc_rec(&format!("{} test compiled successfully!", config.mode)[],
91+
fatal_proc_rec("compile-fail test compiled successfully!",
9392
&proc_res);
9493
}
9594

@@ -1134,7 +1133,7 @@ fn compile_test_(config: &Config, props: &TestProps,
11341133
// FIXME (#9639): This needs to handle non-utf8 paths
11351134
let mut link_args = vec!("-L".to_string(),
11361135
aux_dir.as_str().unwrap().to_string());
1137-
link_args.extend(extra_args.iter().cloned());
1136+
link_args.extend(extra_args.iter().map(|s| s.clone()));
11381137
let args = make_compile_args(config,
11391138
props,
11401139
link_args,

branches/snap-stage3/src/libcollections/bit.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2286,7 +2286,7 @@ mod tests {
22862286
#[test]
22872287
fn test_from_bools() {
22882288
let bools = vec![true, false, true, true];
2289-
let bitv: Bitv = bools.iter().cloned().collect();
2289+
let bitv: Bitv = bools.iter().map(|n| *n).collect();
22902290
assert_eq!(format!("{:?}", bitv), "1011");
22912291
}
22922292

@@ -2299,12 +2299,12 @@ mod tests {
22992299
#[test]
23002300
fn test_bitv_iterator() {
23012301
let bools = vec![true, false, true, true];
2302-
let bitv: Bitv = bools.iter().cloned().collect();
2302+
let bitv: Bitv = bools.iter().map(|n| *n).collect();
23032303

23042304
assert_eq!(bitv.iter().collect::<Vec<bool>>(), bools);
23052305

23062306
let long: Vec<_> = (0i32..10000).map(|i| i % 2 == 0).collect();
2307-
let bitv: Bitv = long.iter().cloned().collect();
2307+
let bitv: Bitv = long.iter().map(|n| *n).collect();
23082308
assert_eq!(bitv.iter().collect::<Vec<bool>>(), long)
23092309
}
23102310

branches/snap-stage3/src/libcollections/dlist.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ impl<A: Ord> Ord for DList<A> {
907907
#[stable(feature = "rust1", since = "1.0.0")]
908908
impl<A: Clone> Clone for DList<A> {
909909
fn clone(&self) -> DList<A> {
910-
self.iter().cloned().collect()
910+
self.iter().map(|x| x.clone()).collect()
911911
}
912912
}
913913

@@ -1025,7 +1025,7 @@ mod tests {
10251025

10261026
#[cfg(test)]
10271027
fn list_from<T: Clone>(v: &[T]) -> DList<T> {
1028-
v.iter().cloned().collect()
1028+
v.iter().map(|x| (*x).clone()).collect()
10291029
}
10301030

10311031
#[test]

branches/snap-stage3/src/libcollections/vec.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ use core::cmp::{Ordering};
5656
use core::default::Default;
5757
use core::fmt;
5858
use core::hash::{self, Hash};
59-
use core::intrinsics::assume;
6059
use core::iter::{repeat, FromIterator, IntoIterator};
6160
use core::marker::{self, ContravariantLifetime, InvariantType};
6261
use core::mem;
@@ -1588,12 +1587,8 @@ impl<T> AsSlice<T> for Vec<T> {
15881587
#[stable(feature = "rust1", since = "1.0.0")]
15891588
fn as_slice(&self) -> &[T] {
15901589
unsafe {
1591-
let p = *self.ptr;
1592-
if cfg!(not(stage0)) { // NOTE remove cfg after next snapshot
1593-
assume(p != 0 as *mut T);
1594-
}
15951590
mem::transmute(RawSlice {
1596-
data: p,
1591+
data: *self.ptr,
15971592
len: self.len
15981593
})
15991594
}

branches/snap-stage3/src/libcore/iter.rs

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ pub trait IteratorExt: Iterator + Sized {
332332
///
333333
/// ```
334334
/// let xs = [100, 200, 300];
335-
/// let mut it = xs.iter().cloned().peekable();
335+
/// let mut it = xs.iter().map(|x| *x).peekable();
336336
/// assert_eq!(*it.peek().unwrap(), 100);
337337
/// assert_eq!(it.next().unwrap(), 100);
338338
/// assert_eq!(it.next().unwrap(), 200);
@@ -522,7 +522,7 @@ pub trait IteratorExt: Iterator + Sized {
522522
///
523523
/// let a = [1, 4, 2, 3, 8, 9, 6];
524524
/// let sum = a.iter()
525-
/// .cloned()
525+
/// .map(|&x| x)
526526
/// .inspect(|&x| println!("filtering {}", x))
527527
/// .filter(|&x| x % 2 == 0)
528528
/// .inspect(|&x| println!("{} made it through", x))
@@ -561,7 +561,7 @@ pub trait IteratorExt: Iterator + Sized {
561561
///
562562
/// ```
563563
/// let a = [1, 2, 3, 4, 5];
564-
/// let b: Vec<_> = a.iter().cloned().collect();
564+
/// let b: Vec<_> = a.iter().map(|&x| x).collect();
565565
/// assert_eq!(a, b);
566566
/// ```
567567
#[inline]
@@ -937,7 +937,7 @@ pub trait IteratorExt: Iterator + Sized {
937937
///
938938
/// ```
939939
/// let a = [(1, 2), (3, 4)];
940-
/// let (left, right): (Vec<_>, Vec<_>) = a.iter().cloned().unzip();
940+
/// let (left, right): (Vec<_>, Vec<_>) = a.iter().map(|&x| x).unzip();
941941
/// assert_eq!([1, 3], left);
942942
/// assert_eq!([2, 4], right);
943943
/// ```
@@ -1142,7 +1142,7 @@ pub trait AdditiveIterator<A> {
11421142
/// use std::iter::AdditiveIterator;
11431143
///
11441144
/// let a = [1i32, 2, 3, 4, 5];
1145-
/// let mut it = a.iter().cloned();
1145+
/// let mut it = a.iter().map(|&x| x);
11461146
/// assert!(it.sum() == 15);
11471147
/// ```
11481148
fn sum(self) -> A;
@@ -1305,23 +1305,6 @@ impl<T, D, I> ExactSizeIterator for Cloned<I> where
13051305
I: ExactSizeIterator<Item=D>,
13061306
{}
13071307

1308-
#[unstable(feature = "core", reason = "trait is experimental")]
1309-
impl<T, D, I> RandomAccessIterator for Cloned<I> where
1310-
T: Clone,
1311-
D: Deref<Target=T>,
1312-
I: RandomAccessIterator<Item=D>
1313-
{
1314-
#[inline]
1315-
fn indexable(&self) -> usize {
1316-
self.it.indexable()
1317-
}
1318-
1319-
#[inline]
1320-
fn idx(&mut self, index: usize) -> Option<T> {
1321-
self.it.idx(index).cloned()
1322-
}
1323-
}
1324-
13251308
/// An iterator that repeats endlessly
13261309
#[derive(Clone)]
13271310
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]

branches/snap-stage3/src/libcore/ptr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ impl<T> PtrExt for *const T {
303303

304304
#[inline]
305305
#[stable(feature = "rust1", since = "1.0.0")]
306-
fn is_null(self) -> bool { self == 0 as *const T }
306+
fn is_null(self) -> bool { self as usize == 0 }
307307

308308
#[inline]
309309
#[stable(feature = "rust1", since = "1.0.0")]
@@ -330,7 +330,7 @@ impl<T> PtrExt for *mut T {
330330

331331
#[inline]
332332
#[stable(feature = "rust1", since = "1.0.0")]
333-
fn is_null(self) -> bool { self == 0 as *mut T }
333+
fn is_null(self) -> bool { self as usize == 0 }
334334

335335
#[inline]
336336
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)