Skip to content

Rollup of 16 pull requests #37262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 64 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b0eee76
Include attributes on generic parameter bindings in pretty printer.
pnkfelix Oct 10, 2016
4bb68be
Add feature gate for `dropck_eyepatch` feature (RFC 1327).
pnkfelix Oct 11, 2016
e8ccc68
Thread `pure_wrt_drop` field through lifetime and type parameters.
pnkfelix Oct 11, 2016
7d2d5bc
Code for enforcing `#[may_dangle]` attribute.
pnkfelix Oct 11, 2016
9a649c3
Require destructors using `#[may_dangle]` to use `unsafe impl`.
pnkfelix Oct 12, 2016
e185cd5
Fix bug in test for E0199 and add test for E0198.
pnkfelix Oct 12, 2016
fa7f69c
tests for `#[may_dangle]` attribute.
pnkfelix Oct 11, 2016
b486a87
add test case for changing private methods
nikomatsakis Oct 12, 2016
8dd9493
placate diagnostic checking tests by fixing sample code in E0569.
pnkfelix Oct 12, 2016
c239fee
fix typo in diagnostic sample code
pnkfelix Oct 13, 2016
029dcee
Avoid many CrateConfig clones.
nnethercote Oct 13, 2016
094c3a2
test: Don't write files into the source tree
alexcrichton Oct 14, 2016
06d173a
Add AppVeyor configuration to the repo
alexcrichton Oct 7, 2016
ac42f3f
correct erroneous pluralization of '1 type argument' error messages
zackmdavis Oct 15, 2016
d902963
Refactor `syntax::ext::base::Resolver::resolve_invoc`.
jseyfried Oct 14, 2016
33e3da8
Use the macro namespace for custom derives.
jseyfried Oct 15, 2016
aac6dca
Treat custom derive extern crates like empty modules.
jseyfried Oct 15, 2016
5afd6d8
Run rustfmt on libcore/sync folder
srinivasreddy Oct 16, 2016
e4ed345
impl Debug for ReadDir
diwic Oct 16, 2016
49e6b46
Mark enums with non-zero discriminant as non-zero
petrochenkov Oct 12, 2016
88fde7f
Don't process cycles when stalled
jonas-schievink Oct 17, 2016
ed50159
Expand .zip() specialization to .map() and .cloned()
bluss Oct 17, 2016
0271a9a
Fix Subst construction: use subst from adt_def rather than Drop impl'…
pnkfelix Oct 17, 2016
818ac08
remove fixme that i no longer think appropriate.
pnkfelix Oct 17, 2016
85d2e4d
Review feedback: add linebreak and reindent to make braces match better.
pnkfelix Oct 17, 2016
0d8f716
Review feedback: expand comment and simplify some code.
pnkfelix Oct 17, 2016
4124d8e
Moved new dropck-eyepatch compile-fail tests to the `ui/` subtree.
pnkfelix Oct 17, 2016
d07523c
ICH: Use 128-bit Blake2b hash instead of 64-bit SipHash for incr. com…
michaelwoerister Oct 7, 2016
0a0efcb
std::collections: Reexport libcollections's range module
bluss Oct 17, 2016
0c844d2
Set stalled=false when encountering an error
jonas-schievink Oct 17, 2016
c560ca4
Fix typo
michaelwoerister Oct 17, 2016
9578e1a
Fix partially consumed tokens in macro matchers.
jseyfried Oct 16, 2016
95a9e2a
Add regression test.
jseyfried Oct 16, 2016
a29b503
Add stable example to TypeId
Oct 18, 2016
10a58ac
Incorporate review feedback: code formatting fixes, expand a comment.
pnkfelix Oct 18, 2016
d11cd46
Add TypedArena::alloc_slice.
Mark-Simulacrum Oct 17, 2016
7a38599
Use TypedArena::alloc_slice in rustc.
Mark-Simulacrum Oct 17, 2016
1cc1dcc
run rustfmt on libpanic_unwind
srinivasreddy Oct 18, 2016
b260617
run rustfmt on librustc_errors folder
srinivasreddy Oct 18, 2016
4a91a80
Fix some pretty printing tests
petrochenkov Oct 12, 2016
93417fa
Add invalid doc comment help message
GuillaumeGomez Oct 4, 2016
d3c5905
Allow bootstrapping without a key. Fixes #36548
brson Oct 18, 2016
c98211d
Rollup merge of #36964 - GuillaumeGomez:comment_error, r=jonathandturner
eddyb Oct 19, 2016
f7766e8
Rollup merge of #37117 - pnkfelix:may-dangle-attr, r=nikomatsakis
eddyb Oct 19, 2016
ea75c75
Rollup merge of #37124 - nikomatsakis:incr-comp-benchmark, r=michaelw…
eddyb Oct 19, 2016
5e6168f
Rollup merge of #37161 - nnethercote:no-cfg-cloning, r=nrc
eddyb Oct 19, 2016
b9241bc
Rollup merge of #37176 - alexcrichton:no-write-to-root, r=brson
eddyb Oct 19, 2016
9ffc011
Rollup merge of #37182 - alexcrichton:appveyor, r=brson
eddyb Oct 19, 2016
46de940
Rollup merge of #37193 - zackmdavis:pluralization_of_expected_type_ar…
eddyb Oct 19, 2016
a979c01
Rollup merge of #37198 - jseyfried:future_proof_macros_11, r=nrc
eddyb Oct 19, 2016
59e5fbe
Rollup merge of #37202 - petrochenkov:pretty, r=nrc
eddyb Oct 19, 2016
e7b1d4a
Rollup merge of #37208 - jseyfried:fix_partially_consumed_tokens_in_m…
eddyb Oct 19, 2016
ba69fd7
Rollup merge of #37218 - srinivasreddy:sync, r=nrc
eddyb Oct 19, 2016
ce9e95a
Rollup merge of #37220 - Mark-Simulacrum:arena-alloc-slice, r=eddyb
eddyb Oct 19, 2016
82371f8
Rollup merge of #37221 - diwic:6a-readdir-debug, r=alexcrichton
eddyb Oct 19, 2016
f399259
Rollup merge of #37224 - petrochenkov:nz, r=eddyb
eddyb Oct 19, 2016
58b64e7
Rollup merge of #37230 - bluss:zip-specialization-for-map, r=alexcric…
eddyb Oct 19, 2016
4d9d15c
Rollup merge of #37231 - jonas-schievink:obligation-forest-the-quest-…
eddyb Oct 19, 2016
e41219c
Rollup merge of #37233 - michaelwoerister:blake2-for-ich, r=nikomatsakis
eddyb Oct 19, 2016
356cec1
Rollup merge of #37236 - bluss:range-argument, r=alexcrichton
eddyb Oct 19, 2016
d386547
Rollup merge of #37240 - jethrogb:typeid_doc, r=sfackler
eddyb Oct 19, 2016
91487db
Rollup merge of #37254 - srinivasreddy:master, r=alexcrichton
eddyb Oct 19, 2016
e1d2999
Rollup merge of #37257 - srinivasreddy:librustc_errors, r=eddyb
eddyb Oct 19, 2016
38708e5
Rollup merge of #37265 - brson:bootstrap, r=alexcrichton
eddyb Oct 19, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 5 additions & 21 deletions mk/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,6 @@ endif
# versions in the same place
CFG_FILENAME_EXTRA=$(shell printf '%s' $(CFG_RELEASE)$(CFG_EXTRA_FILENAME) | $(CFG_HASH_COMMAND))

# A magic value that allows the compiler to use unstable features during the
# bootstrap even when doing so would normally be an error because of feature
# staging or because the build turns on warnings-as-errors and unstable features
# default to warnings. The build has to match this key in an env var.
#
# This value is keyed off the release to ensure that all compilers for one
# particular release have the same bootstrap key. Note that this is
# intentionally not "secure" by any definition, this is largely just a deterrent
# from users enabling unstable features on the stable compiler.
CFG_BOOTSTRAP_KEY=$(CFG_FILENAME_EXTRA)

# If local-rust is the same as the current version, then force a local-rebuild
ifdef CFG_ENABLE_LOCAL_RUST
ifeq ($(CFG_RELEASE),\
Expand All @@ -73,14 +62,6 @@ ifeq ($(CFG_RELEASE),\
endif
endif

# The stage0 compiler needs to use the previous key recorded in src/stage0.txt,
# except for local-rebuild when it just uses the same current key.
ifdef CFG_ENABLE_LOCAL_REBUILD
CFG_BOOTSTRAP_KEY_STAGE0=$(CFG_BOOTSTRAP_KEY)
else
CFG_BOOTSTRAP_KEY_STAGE0=$(shell sed -ne 's/^rustc_key: //p' $(S)src/stage0.txt)
endif

# The name of the package to use for creating tarballs, installers etc.
CFG_PACKAGE_NAME=rustc-$(CFG_PACKAGE_VERS)

Expand Down Expand Up @@ -387,13 +368,16 @@ CFG_INFO := $(info cfg: disabling unstable features (CFG_DISABLE_UNSTABLE_FEATUR
# Turn on feature-staging
export CFG_DISABLE_UNSTABLE_FEATURES
# Subvert unstable feature lints to do the self-build
export RUSTC_BOOTSTRAP_KEY:=$(CFG_BOOTSTRAP_KEY)
export RUSTC_BOOTSTRAP
endif
export CFG_BOOTSTRAP_KEY
ifdef CFG_MUSL_ROOT
export CFG_MUSL_ROOT
endif

# FIXME: Transitionary measure to bootstrap using the old bootstrap logic.
# Remove this once the bootstrap compiler uses the new login in Issue #36548.
export RUSTC_BOOTSTRAP_KEY=62b3e239

######################################################################
# Per-stage targets and runner
######################################################################
Expand Down
21 changes: 0 additions & 21 deletions mk/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,6 @@ $(foreach host,$(CFG_HOST), \
$(foreach crate,$(CRATES), \
$(eval $(call RUST_CRATE_FULLDEPS,$(stage),$(target),$(host),$(crate)))))))

# $(1) stage
# $(2) target
# $(3) host
define DEFINE_BOOTSTRAP_KEY
BOOTSTRAP_KEY$(1)_T_$(2)_H_$(3) := $$(CFG_BOOTSTRAP_KEY)
ifeq ($(1),0)
ifeq ($(3),$$(CFG_BUILD))
BOOTSTRAP_KEY$(1)_T_$(2)_H_$(3) := $$(CFG_BOOTSTRAP_KEY_STAGE0)
endif
endif
endef

$(foreach host,$(CFG_TARGET), \
$(foreach target,$(CFG_TARGET), \
$(foreach stage,$(STAGES), \
$(eval $(call DEFINE_BOOTSTRAP_KEY,$(stage),$(target),$(host))))))

# RUST_TARGET_STAGE_N template: This defines how target artifacts are built
# for all stage/target architecture combinations. This is one giant rule which
# works as follows:
Expand All @@ -83,8 +66,6 @@ $(foreach host,$(CFG_TARGET), \
define RUST_TARGET_STAGE_N

$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): CFG_COMPILER_HOST_TRIPLE = $(2)
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
export RUSTC_BOOTSTRAP_KEY := $$(BOOTSTRAP_KEY$(1)_T_$(2)_H_$(3))
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
$$(CRATEFILE_$(4)) \
$$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4)) \
Expand Down Expand Up @@ -132,8 +113,6 @@ endef
# $(4) - name of the tool being built
define TARGET_TOOL

$$(TBIN$(1)_T_$(2)_H_$(3))/$(4)$$(X_$(2)): \
export RUSTC_BOOTSTRAP_KEY := $$(BOOTSTRAP_KEY$(1)_T_$(2)_H_$(3))
$$(TBIN$(1)_T_$(2)_H_$(3))/$(4)$$(X_$(2)): \
$$(TOOL_SOURCE_$(4)) \
$$(TOOL_INPUTS_$(4)) \
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ pub fn compiletest(build: &Build,
}
}
}
build.add_bootstrap_key(compiler, &mut cmd);
build.add_bootstrap_key(&mut cmd);

cmd.arg("--adb-path").arg("adb");
cmd.arg("--adb-test-dir").arg(ADB_TEST_DIR);
Expand Down
3 changes: 1 addition & 2 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ fn build_startup_objects(build: &Build, target: &str, into: &Path) {
for file in t!(fs::read_dir(build.src.join("src/rtstartup"))) {
let file = t!(file);
let mut cmd = Command::new(&compiler_path);
build.add_bootstrap_key(&compiler, &mut cmd);
build.add_bootstrap_key(&mut cmd);
build.run(cmd.arg("--target").arg(target)
.arg("--emit=obj")
.arg("--out-dir").arg(into)
Expand Down Expand Up @@ -185,7 +185,6 @@ pub fn rustc<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
cargo.env("CFG_RELEASE", &build.release)
.env("CFG_RELEASE_CHANNEL", &build.config.channel)
.env("CFG_VERSION", &build.version)
.env("CFG_BOOTSTRAP_KEY", &build.bootstrap_key)
.env("CFG_PREFIX", build.config.prefix.clone().unwrap_or(String::new()))
.env("CFG_LIBDIR_RELATIVE", "lib");

Expand Down
17 changes: 6 additions & 11 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ impl Build {
.env("RUSTDOC_REAL", self.rustdoc(compiler))
.env("RUSTC_FLAGS", self.rustc_flags(target).join(" "));

self.add_bootstrap_key(compiler, &mut cargo);
self.add_bootstrap_key(&mut cargo);

// Specify some various options for build scripts used throughout
// the build.
Expand Down Expand Up @@ -871,16 +871,11 @@ impl Build {
}

/// Adds the compiler's bootstrap key to the environment of `cmd`.
fn add_bootstrap_key(&self, compiler: &Compiler, cmd: &mut Command) {
// In stage0 we're using a previously released stable compiler, so we
// use the stage0 bootstrap key. Otherwise we use our own build's
// bootstrap key.
let bootstrap_key = if compiler.is_snapshot(self) && !self.local_rebuild {
&self.bootstrap_key_stage0
} else {
&self.bootstrap_key
};
cmd.env("RUSTC_BOOTSTRAP_KEY", bootstrap_key);
fn add_bootstrap_key(&self, cmd: &mut Command) {
cmd.env("RUSTC_BOOTSTRAP", "");
// FIXME: Transitionary measure to bootstrap using the old bootstrap logic.
// Remove this once the bootstrap compiler uses the new login in Issue #36548.
cmd.env("RUSTC_BOOTSTRAP_KEY", "62b3e239");
}

/// Returns the compiler's libdir where it stores the dynamic libraries that
Expand Down
15 changes: 6 additions & 9 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1330,15 +1330,12 @@ impl UnstableFeatures {
pub fn from_environment() -> UnstableFeatures {
// Whether this is a feature-staged build, i.e. on the beta or stable channel
let disable_unstable_features = option_env!("CFG_DISABLE_UNSTABLE_FEATURES").is_some();
// The secret key needed to get through the rustc build itself by
// subverting the unstable features lints
let bootstrap_secret_key = option_env!("CFG_BOOTSTRAP_KEY");
// The matching key to the above, only known by the build system
let bootstrap_provided_key = env::var("RUSTC_BOOTSTRAP_KEY").ok();
match (disable_unstable_features, bootstrap_secret_key, bootstrap_provided_key) {
(_, Some(ref s), Some(ref p)) if s == p => UnstableFeatures::Cheat,
(true, _, _) => UnstableFeatures::Disallow,
(false, _, _) => UnstableFeatures::Allow
// Whether we should enable unstable features for bootstrapping
let bootstrap = env::var("RUSTC_BOOTSTRAP").is_ok();
match (disable_unstable_features, bootstrap) {
(_, true) => UnstableFeatures::Cheat,
(true, _) => UnstableFeatures::Disallow,
(false, _) => UnstableFeatures::Allow
}
}

Expand Down
1 change: 0 additions & 1 deletion src/stage0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@
# released on `$date`

rustc: beta-2016-09-28
rustc_key: 62b3e239
cargo: nightly-2016-09-26