Skip to content

Commit 1d65bfa

Browse files
committed
---
yaml --- r: 276968 b: refs/heads/try c: e4d4fa3 h: refs/heads/master
1 parent 609abcf commit 1d65bfa

File tree

551 files changed

+5295
-6948
lines changed

Some content is hidden

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

551 files changed

+5295
-6948
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: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 8694b4ffe9b223c351e50c10bd8ea4e23af58baa
4+
refs/heads/try: e4d4fa3295bf5bfd8a798557d5cf0158ca453f84
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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,18 @@ if [ -n "$CFG_ENABLE_DEBUG_JEMALLOC" ]; then putvar CFG_ENABLE_DEBUG_JEMALLOC; f
717717

718718
if [ -n "$CFG_ENABLE_ORBIT" ]; then putvar CFG_ENABLE_ORBIT; fi
719719

720+
# A magic value that allows the compiler to use unstable features
721+
# during the bootstrap even when doing so would normally be an error
722+
# because of feature staging or because the build turns on
723+
# warnings-as-errors and unstable features default to warnings. The
724+
# build has to match this key in an env var. Meant to be a mild
725+
# deterrent from users just turning on unstable features on the stable
726+
# channel.
727+
# Basing CFG_BOOTSTRAP_KEY on CFG_BOOTSTRAP_KEY lets it get picked up
728+
# during a Makefile reconfig.
729+
CFG_BOOTSTRAP_KEY="${CFG_BOOTSTRAP_KEY-`date +%H:%M:%S`}"
730+
putvar CFG_BOOTSTRAP_KEY
731+
720732
step_msg "looking for build programs"
721733

722734
probe_need CFG_CURLORWGET curl wget

branches/try/mk/crates.mk

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ TARGET_CRATES := libc std term \
5656
alloc_system alloc_jemalloc
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir 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 rustc_front rustc_platform_intrinsics \
6060
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis \
61-
rustc_const_eval rustc_const_math rustc_incremental
61+
rustc_const_eval rustc_const_math
6262
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
6363
flate arena graphviz rbml log serialize
6464
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
@@ -93,39 +93,38 @@ DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
9393
DEPS_syntax_ext := syntax fmt_macros
9494

9595
DEPS_rustc_const_math := std syntax log serialize
96-
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize \
96+
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize rustc_front \
9797
rustc_back graphviz
9898

99-
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml \
99+
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
100100
log graphviz rustc_back rustc_data_structures\
101101
rustc_const_math
102-
DEPS_rustc_back := std syntax flate log libc
103-
DEPS_rustc_borrowck := rustc rustc_mir log graphviz syntax
102+
DEPS_rustc_back := std syntax rustc_front flate log libc
103+
DEPS_rustc_borrowck := rustc rustc_front rustc_mir log graphviz syntax
104104
DEPS_rustc_data_structures := std log serialize
105105
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
106106
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
107-
rustc_trans rustc_privacy rustc_lint rustc_plugin \
108-
rustc_metadata syntax_ext rustc_passes rustc_save_analysis rustc_const_eval \
109-
rustc_incremental
107+
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
108+
rustc_metadata syntax_ext rustc_passes rustc_save_analysis rustc_const_eval
109+
DEPS_rustc_front := std syntax log serialize
110110
DEPS_rustc_lint := rustc log syntax rustc_const_eval
111111
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
112-
DEPS_rustc_metadata := rustc syntax rbml rustc_const_math
113-
DEPS_rustc_passes := syntax rustc core rustc_const_eval
114-
DEPS_rustc_mir := rustc syntax rustc_const_math rustc_const_eval
115-
DEPS_rustc_resolve := arena rustc log syntax
112+
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_math
113+
DEPS_rustc_passes := syntax rustc core rustc_front rustc_const_eval
114+
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_math rustc_const_eval
115+
DEPS_rustc_resolve := arena rustc rustc_front log syntax
116116
DEPS_rustc_platform_intrinsics := std
117117
DEPS_rustc_plugin := rustc rustc_metadata syntax rustc_mir
118-
DEPS_rustc_privacy := rustc log syntax
118+
DEPS_rustc_privacy := rustc rustc_front log syntax
119119
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
120-
log syntax serialize rustc_llvm rustc_platform_intrinsics \
121-
rustc_const_math rustc_const_eval rustc_incremental
122-
DEPS_rustc_incremental := rbml rustc serialize rustc_data_structures
123-
DEPS_rustc_save_analysis := rustc log syntax
124-
DEPS_rustc_typeck := rustc syntax rustc_platform_intrinsics rustc_const_math \
120+
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
121+
rustc_const_math rustc_const_eval
122+
DEPS_rustc_save_analysis := rustc log syntax rustc_front
123+
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_math \
125124
rustc_const_eval
126125

127126
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
128-
test rustc_lint rustc_const_eval
127+
test rustc_lint rustc_front rustc_const_eval
129128

130129

131130
TOOL_DEPS_compiletest := test getopts log

branches/try/mk/main.mk

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,6 @@ CFG_PRERELEASE_VERSION=.1
2424
# versions in the same place
2525
CFG_FILENAME_EXTRA=$(shell printf '%s' $(CFG_RELEASE)$(CFG_EXTRA_FILENAME) | $(CFG_HASH_COMMAND))
2626

27-
# A magic value that allows the compiler to use unstable features during the
28-
# bootstrap even when doing so would normally be an error because of feature
29-
# staging or because the build turns on warnings-as-errors and unstable features
30-
# default to warnings. The build has to match this key in an env var.
31-
#
32-
# This value is keyed off the release to ensure that all compilers for one
33-
# particular release have the same bootstrap key. Note that this is
34-
# intentionally not "secure" by any definition, this is largely just a deterrent
35-
# from users enabling unstable features on the stable compiler.
36-
CFG_BOOTSTRAP_KEY=$(CFG_FILENAME_EXTRA)
37-
3827
ifeq ($(CFG_RELEASE_CHANNEL),stable)
3928
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"
4029
CFG_RELEASE=$(CFG_RELEASE_NUM)

branches/try/mk/rt.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ else ifeq ($(findstring android, $(OSTYPE_$(1))), android)
157157
# If the test suite passes, however, without symbol prefixes then we should be
158158
# good to go!
159159
JEMALLOC_ARGS_$(1) := --disable-tls --with-jemalloc-prefix=je_
160-
else ifeq ($(findstring dragonfly, $(OSTYPE_$(1))), dragonfly)
161-
JEMALLOC_ARGS_$(1) := --with-jemalloc-prefix=je_
162160
endif
163161

164162
ifdef CFG_ENABLE_DEBUG_JEMALLOC

branches/try/mk/tests.mk

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
305305
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
306306
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \
307307
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \
308-
check-stage$(1)-T-$(2)-H-$(3)-incremental-exec \
309308
check-stage$(1)-T-$(2)-H-$(3)-doc-exec \
310309
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec
311310

@@ -482,7 +481,6 @@ DEBUGINFO_LLDB_RS := $(call rwildcard,$(S)src/test/debuginfo/,*.rs)
482481
CODEGEN_RS := $(call rwildcard,$(S)src/test/codegen/,*.rs)
483482
CODEGEN_CC := $(call rwildcard,$(S)src/test/codegen/,*.cc)
484483
CODEGEN_UNITS_RS := $(call rwildcard,$(S)src/test/codegen-units/,*.rs)
485-
INCREMENTAL_RS := $(call rwildcard,$(S)src/test/incremental/,*.rs)
486484
RUSTDOCCK_RS := $(call rwildcard,$(S)src/test/rustdoc/,*.rs)
487485

488486
RPASS_TESTS := $(RPASS_RS)
@@ -498,7 +496,6 @@ DEBUGINFO_GDB_TESTS := $(DEBUGINFO_GDB_RS)
498496
DEBUGINFO_LLDB_TESTS := $(DEBUGINFO_LLDB_RS)
499497
CODEGEN_TESTS := $(CODEGEN_RS) $(CODEGEN_CC)
500498
CODEGEN_UNITS_TESTS := $(CODEGEN_UNITS_RS)
501-
INCREMENTAL_TESTS := $(INCREMENTAL_RS)
502499
RUSTDOCCK_TESTS := $(RUSTDOCCK_RS)
503500

504501
CTEST_SRC_BASE_rpass = run-pass
@@ -561,11 +558,6 @@ CTEST_BUILD_BASE_codegen-units = codegen-units
561558
CTEST_MODE_codegen-units = codegen-units
562559
CTEST_RUNTOOL_codegen-units = $(CTEST_RUNTOOL)
563560

564-
CTEST_SRC_BASE_incremental = incremental
565-
CTEST_BUILD_BASE_incremental = incremental
566-
CTEST_MODE_incremental = incremental
567-
CTEST_RUNTOOL_incremental = $(CTEST_RUNTOOL)
568-
569561
CTEST_SRC_BASE_rustdocck = rustdoc
570562
CTEST_BUILD_BASE_rustdocck = rustdoc
571563
CTEST_MODE_rustdocck = rustdoc
@@ -689,7 +681,6 @@ CTEST_DEPS_debuginfo-lldb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_LLDB_TESTS) \
689681
$(S)src/etc/lldb_rust_formatters.py
690682
CTEST_DEPS_codegen_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_TESTS)
691683
CTEST_DEPS_codegen-units_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_UNITS_TESTS)
692-
CTEST_DEPS_incremental_$(1)-T-$(2)-H-$(3) = $$(INCREMENTAL_TESTS)
693684
CTEST_DEPS_rustdocck_$(1)-T-$(2)-H-$(3) = $$(RUSTDOCCK_TESTS) \
694685
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
695686
$(S)src/etc/htmldocck.py
@@ -756,7 +747,7 @@ endif
756747
endef
757748

758749
CTEST_NAMES = rpass rpass-valgrind rpass-full rfail-full cfail-full rfail cfail pfail \
759-
debuginfo-gdb debuginfo-lldb codegen codegen-units rustdocck incremental
750+
debuginfo-gdb debuginfo-lldb codegen codegen-units rustdocck
760751

761752
$(foreach host,$(CFG_HOST), \
762753
$(eval $(foreach target,$(CFG_TARGET), \
@@ -954,7 +945,6 @@ TEST_GROUPS = \
954945
debuginfo-lldb \
955946
codegen \
956947
codegen-units \
957-
incremental \
958948
doc \
959949
$(foreach docname,$(DOC_NAMES),doc-$(docname)) \
960950
pretty \

branches/try/src/build_helper/lib.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,10 @@ pub fn cc2ar(cc: &Path, target: &str) -> PathBuf {
4343
if target.contains("musl") || target.contains("msvc") {
4444
PathBuf::from("ar")
4545
} else {
46-
let parent = cc.parent().unwrap();
4746
let file = cc.file_name().unwrap().to_str().unwrap();
48-
for suffix in &["gcc", "cc", "clang"] {
49-
if let Some(idx) = file.rfind(suffix) {
50-
let mut file = file[..idx].to_owned();
51-
file.push_str("ar");
52-
return parent.join(&file);
53-
}
54-
}
55-
parent.join(file)
47+
cc.parent().unwrap().join(file.replace("gcc", "ar")
48+
.replace("cc", "ar")
49+
.replace("clang", "ar"))
5650
}
5751
}
5852

branches/try/src/compiletest/common.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ pub enum Mode {
2525
DebugInfoLldb,
2626
Codegen,
2727
Rustdoc,
28-
CodegenUnits,
29-
Incremental,
28+
CodegenUnits
3029
}
3130

3231
impl FromStr for Mode {
@@ -44,7 +43,6 @@ impl FromStr for Mode {
4443
"codegen" => Ok(Codegen),
4544
"rustdoc" => Ok(Rustdoc),
4645
"codegen-units" => Ok(CodegenUnits),
47-
"incremental" => Ok(Incremental),
4846
_ => Err(()),
4947
}
5048
}
@@ -64,7 +62,6 @@ impl fmt::Display for Mode {
6462
Codegen => "codegen",
6563
Rustdoc => "rustdoc",
6664
CodegenUnits => "codegen-units",
67-
Incremental => "incremental",
6865
}, f)
6966
}
7067
}

branches/try/src/compiletest/compiletest.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
7171
reqopt("", "aux-base", "directory to find auxiliary test files", "PATH"),
7272
reqopt("", "stage-id", "the target-stage identifier", "stageN-TARGET"),
7373
reqopt("", "mode", "which sort of compile tests to run",
74-
"(compile-fail|parse-fail|run-fail|run-pass|\
75-
run-pass-valgrind|pretty|debug-info|incremental)"),
74+
"(compile-fail|parse-fail|run-fail|run-pass|run-pass-valgrind|pretty|debug-info)"),
7675
optflag("", "ignored", "run tests marked as ignored"),
7776
optopt("", "runtool", "supervisor program to run tests under \
7877
(eg. emulator, valgrind)", "PROGRAM"),

branches/try/src/compiletest/runtest.rs

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use common::Config;
1212
use common::{CompileFail, ParseFail, Pretty, RunFail, RunPass, RunPassValgrind};
1313
use common::{Codegen, DebugInfoLldb, DebugInfoGdb, Rustdoc, CodegenUnits};
14-
use common::{Incremental};
1514
use errors::{self, ErrorKind};
1615
use header::TestProps;
1716
use header;
@@ -60,7 +59,6 @@ pub fn run(config: Config, testpaths: &TestPaths) {
6059
Codegen => run_codegen_test(&config, &props, &testpaths),
6160
Rustdoc => run_rustdoc_test(&config, &props, &testpaths),
6261
CodegenUnits => run_codegen_units_test(&config, &props, &testpaths),
63-
Incremental => run_incremental_test(&config, &props, &testpaths),
6462
}
6563
}
6664

@@ -1968,67 +1966,3 @@ fn run_codegen_units_test(config: &Config, props: &TestProps, testpaths: &TestPa
19681966
panic!();
19691967
}
19701968
}
1971-
1972-
fn run_incremental_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
1973-
// Basic plan for a test incremental/foo/bar.rs:
1974-
// - load list of revisions pass1, fail2, pass3
1975-
// - each should begin with `rpass`, `rfail`, or `cfail`
1976-
// - if `rpass`, expect compile and execution to succeed
1977-
// - if `cfail`, expect compilation to fail
1978-
// - if `rfail`, expect execution to fail
1979-
// - create a directory build/foo/bar.incremental
1980-
// - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C pass1
1981-
// - because name of revision starts with "pass", expect success
1982-
// - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C fail2
1983-
// - because name of revision starts with "fail", expect an error
1984-
// - load expected errors as usual, but filter for those that end in `[fail2]`
1985-
// - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C pass3
1986-
// - because name of revision starts with "pass", expect success
1987-
// - execute build/foo/bar.exe and save output
1988-
//
1989-
// FIXME -- use non-incremental mode as an oracle? That doesn't apply
1990-
// to #[rustc_dirty] and clean tests I guess
1991-
1992-
assert!(!props.revisions.is_empty(), "incremental tests require a list of revisions");
1993-
1994-
let output_base_name = output_base_name(config, testpaths);
1995-
1996-
// Create the incremental workproduct directory.
1997-
let incremental_dir = output_base_name.with_extension("incremental");
1998-
if incremental_dir.exists() {
1999-
fs::remove_dir_all(&incremental_dir).unwrap();
2000-
}
2001-
fs::create_dir_all(&incremental_dir).unwrap();
2002-
2003-
if config.verbose {
2004-
print!("incremental_dir={}", incremental_dir.display());
2005-
}
2006-
2007-
for revision in &props.revisions {
2008-
let mut revision_props = props.clone();
2009-
header::load_props_into(&mut revision_props, &testpaths.file, Some(&revision));
2010-
2011-
revision_props.compile_flags.extend(vec![
2012-
format!("-Z"),
2013-
format!("incremental={}", incremental_dir.display()),
2014-
format!("--cfg"),
2015-
format!("{}", revision),
2016-
]);
2017-
2018-
if config.verbose {
2019-
print!("revision={:?} revision_props={:#?}", revision, revision_props);
2020-
}
2021-
2022-
if revision.starts_with("rpass") {
2023-
run_rpass_test_revision(config, &revision_props, testpaths, Some(&revision));
2024-
} else if revision.starts_with("rfail") {
2025-
run_rfail_test_revision(config, &revision_props, testpaths, Some(&revision));
2026-
} else if revision.starts_with("cfail") {
2027-
run_cfail_test_revision(config, &revision_props, testpaths, Some(&revision));
2028-
} else {
2029-
fatal(
2030-
Some(revision),
2031-
"revision name must begin with rpass, rfail, or cfail");
2032-
}
2033-
}
2034-
}

branches/try/src/doc/book/closures.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,14 @@ assert_eq!(6, answer);
371371
This gives us these long, related errors:
372372

373373
```text
374-
error: the trait bound `core::ops::Fn(i32) -> i32 : core::marker::Sized` is not satisfied [E0277]
374+
error: the trait `core::marker::Sized` is not implemented for the type
375+
`core::ops::Fn(i32) -> i32` [E0277]
375376
fn factory() -> (Fn(i32) -> i32) {
376377
^~~~~~~~~~~~~~~~
377378
note: `core::ops::Fn(i32) -> i32` does not have a constant size known at compile-time
378379
fn factory() -> (Fn(i32) -> i32) {
379380
^~~~~~~~~~~~~~~~
380-
error: the trait bound `core::ops::Fn(i32) -> i32 : core::marker::Sized` is not satisfied [E0277]
381+
error: the trait `core::marker::Sized` is not implemented for the type `core::ops::Fn(i32) -> i32` [E0277]
381382
let f = factory();
382383
^
383384
note: `core::ops::Fn(i32) -> i32` does not have a constant size known at compile-time

branches/try/src/doc/book/concurrency.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ thread may outlive the scope of `x`, leading to a dangling pointer.
127127

128128
To fix this, we use a `move` closure as mentioned in the error message. `move`
129129
closures are explained in depth [here](closures.html#move-closures); basically
130-
they move variables from their environment into themselves.
130+
they move variables from their environment into themselves. This means that `x`
131+
is now owned by the closure, and cannot be used in `main()` after the call to
132+
`spawn()`.
131133

132134
```rust
133135
use std::thread;
@@ -162,7 +164,7 @@ The same [ownership system](ownership.html) that helps prevent using pointers
162164
incorrectly also helps rule out data races, one of the worst kinds of
163165
concurrency bugs.
164166

165-
As an example, here is a Rust program that could have a data race in many
167+
As an example, here is a Rust program that would have a data race in many
166168
languages. It will not compile:
167169

168170
```ignore
@@ -195,11 +197,6 @@ thread, and the thread takes ownership of the reference, we'd have three owners!
195197
`data` gets moved out of `main` in the first call to `spawn()`, so subsequent
196198
calls in the loop cannot use this variable.
197199

198-
Note that this specific example will not cause a data race since different array
199-
indices are being accessed. But this can't be determined at compile time, and in
200-
a similar situation where `i` is a constant or is random, you would have a data
201-
race.
202-
203200
So, we need some type that lets us have more than one owning reference to a
204201
value. Usually, we'd use `Rc<T>` for this, which is a reference counted type
205202
that provides shared ownership. It has some runtime bookkeeping that keeps track
@@ -234,8 +231,8 @@ fn main() {
234231
This won't work, however, and will give us the error:
235232

236233
```text
237-
13:9: 13:22 error: the trait bound `alloc::rc::Rc<collections::vec::Vec<i32>> : core::marker::Send`
238-
is not satisfied
234+
13:9: 13:22 error: the trait `core::marker::Send` is not
235+
implemented for the type `alloc::rc::Rc<collections::vec::Vec<i32>>`
239236
...
240237
13:9: 13:22 note: `alloc::rc::Rc<collections::vec::Vec<i32>>`
241238
cannot be sent between threads safely

0 commit comments

Comments
 (0)