Skip to content

Commit 753fee4

Browse files
committed
Auto merge of rust-lang#42495 - alexcrichton:new-stage0, r=Mark-Simulacrum
Bump to 1.20.0 and update stage0 compiler Betas are hot off the bots, let's get them while they're fresh.
2 parents 1143eb2 + be7ebdd commit 753fee4

File tree

47 files changed

+24
-283
lines changed

Some content is hidden

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

47 files changed

+24
-283
lines changed

src/Cargo.lock

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bootstrap/bin/rustc.rs

+2-17
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,6 @@ fn main() {
118118
cmd.arg("-Cprefer-dynamic");
119119
}
120120

121-
// Pass the `rustbuild` feature flag to crates which rustbuild is
122-
// building. See the comment in bootstrap/lib.rs where this env var is
123-
// set for more details.
124-
if env::var_os("RUSTBUILD_UNSTABLE").is_some() {
125-
cmd.arg("--cfg").arg("rustbuild");
126-
}
127-
128121
// Help the libc crate compile by assisting it in finding the MUSL
129122
// native libraries.
130123
if let Some(s) = env::var_os("MUSL_ROOT") {
@@ -218,11 +211,7 @@ fn main() {
218211
// do that we pass a weird flag to the compiler to get it to do
219212
// so. Note that this is definitely a hack, and we should likely
220213
// flesh out rpath support more fully in the future.
221-
//
222-
// FIXME: remove condition after next stage0
223-
if stage != "0" {
224-
cmd.arg("-Z").arg("osx-rpath-install-name");
225-
}
214+
cmd.arg("-Z").arg("osx-rpath-install-name");
226215
Some("-Wl,-rpath,@loader_path/../lib")
227216
} else if !target.contains("windows") {
228217
Some("-Wl,-rpath,$ORIGIN/../lib")
@@ -242,12 +231,8 @@ fn main() {
242231
// Force all crates compiled by this compiler to (a) be unstable and (b)
243232
// allow the `rustc_private` feature to link to other unstable crates
244233
// also in the sysroot.
245-
//
246-
// FIXME: remove condition after next stage0
247234
if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() {
248-
if stage != "0" {
249-
cmd.arg("-Z").arg("force-unstable-if-unmarked");
250-
}
235+
cmd.arg("-Z").arg("force-unstable-if-unmarked");
251236
}
252237
}
253238

src/bootstrap/bootstrap.py

+1
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ def build_bootstrap(self):
385385
if self.clean and os.path.exists(build_dir):
386386
shutil.rmtree(build_dir)
387387
env = os.environ.copy()
388+
env["RUSTC_BOOTSTRAP"] = '1'
388389
env["CARGO_TARGET_DIR"] = build_dir
389390
env["RUSTC"] = self.rustc()
390391
env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \

src/bootstrap/channel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use build_helper::output;
2323
use Build;
2424

2525
// The version number
26-
pub const CFG_RELEASE_NUM: &'static str = "1.19.0";
26+
pub const CFG_RELEASE_NUM: &'static str = "1.20.0";
2727

2828
// An optional number to put after the label, e.g. '.2' -> '-beta.2'
2929
// Be sure to make this starts with a dot to conform to semver pre-release

src/bootstrap/check.rs

+1
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ pub fn bootstrap(build: &Build) {
672672
cmd.arg("test")
673673
.current_dir(build.src.join("src/bootstrap"))
674674
.env("CARGO_TARGET_DIR", build.out.join("bootstrap"))
675+
.env("RUSTC_BOOTSTRAP", "1")
675676
.env("RUSTC", &build.rustc);
676677
if build.flags.cmd.no_fail_fast() {
677678
cmd.arg("--no-fail-fast");

src/bootstrap/lib.rs

-23
Original file line numberDiff line numberDiff line change
@@ -429,29 +429,6 @@ impl Build {
429429
.env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_libdir(compiler));
430430
}
431431

432-
// There are two invariants we must maintain:
433-
// * stable crates cannot depend on unstable crates (general Rust rule),
434-
// * crates that end up in the sysroot must be unstable (rustbuild rule).
435-
//
436-
// In order to do enforce the latter, we pass the env var
437-
// `RUSTBUILD_UNSTABLE` down the line for any crates which will end up
438-
// in the sysroot. We read this in bootstrap/bin/rustc.rs and if it is
439-
// set, then we pass the `rustbuild` feature to rustc when building the
440-
// the crate.
441-
//
442-
// In turn, crates that can be used here should recognise the `rustbuild`
443-
// feature and opt-in to `rustc_private`.
444-
//
445-
// We can't always pass `rustbuild` because crates which are outside of
446-
// the compiler, libs, and tests are stable and we don't want to make
447-
// their deps unstable (since this would break the first invariant
448-
// above).
449-
//
450-
// FIXME: remove this after next stage0
451-
if mode != Mode::Tool && stage == 0 {
452-
cargo.env("RUSTBUILD_UNSTABLE", "1");
453-
}
454-
455432
// Ignore incremental modes except for stage0, since we're
456433
// not guaranteeing correctness across builds if the compiler
457434
// is changing under your feet.`

src/doc/unstable-book/src/library-features/question-mark-carrier.md

-13
This file was deleted.

src/liballoc_jemalloc/build.rs

+5
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ fn main() {
154154
make.current_dir(&native.out_dir)
155155
.arg("build_lib_static");
156156

157+
// These are intended for mingw32-make which we don't use
158+
if cfg!(windows) {
159+
make.env_remove("MAKEFLAGS").env_remove("MFLAGS");
160+
}
161+
157162
// mingw make seems... buggy? unclear...
158163
if !host.contains("windows") {
159164
make.arg("-j")

src/libarena/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
//! objects of a single type.
2020
2121
#![crate_name = "arena"]
22-
#![cfg_attr(stage0, unstable(feature = "rustc_private", issue = "27812"))]
2322
#![crate_type = "rlib"]
2423
#![crate_type = "dylib"]
2524
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@@ -33,7 +32,6 @@
3332
#![feature(dropck_eyepatch)]
3433
#![feature(generic_param_attrs)]
3534
#![feature(needs_drop)]
36-
#![cfg_attr(stage0, feature(staged_api))]
3735
#![cfg_attr(test, feature(test))]
3836

3937
#![allow(deprecated)]

src/libcore/intrinsics.rs

-14
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,6 @@ extern "rust-intrinsic" {
572572
///
573573
/// The `locality` argument must be a constant integer and is a temporal locality specifier
574574
/// ranging from (0) - no locality, to (3) - extremely local keep in cache
575-
#[cfg(not(stage0))]
576575
pub fn prefetch_read_data<T>(data: *const T, locality: i32);
577576
/// The `prefetch` intrinsic is a hint to the code generator to insert a prefetch instruction
578577
/// if supported; otherwise, it is a noop.
@@ -581,7 +580,6 @@ extern "rust-intrinsic" {
581580
///
582581
/// The `locality` argument must be a constant integer and is a temporal locality specifier
583582
/// ranging from (0) - no locality, to (3) - extremely local keep in cache
584-
#[cfg(not(stage0))]
585583
pub fn prefetch_write_data<T>(data: *const T, locality: i32);
586584
/// The `prefetch` intrinsic is a hint to the code generator to insert a prefetch instruction
587585
/// if supported; otherwise, it is a noop.
@@ -590,7 +588,6 @@ extern "rust-intrinsic" {
590588
///
591589
/// The `locality` argument must be a constant integer and is a temporal locality specifier
592590
/// ranging from (0) - no locality, to (3) - extremely local keep in cache
593-
#[cfg(not(stage0))]
594591
pub fn prefetch_read_instruction<T>(data: *const T, locality: i32);
595592
/// The `prefetch` intrinsic is a hint to the code generator to insert a prefetch instruction
596593
/// if supported; otherwise, it is a noop.
@@ -599,20 +596,9 @@ extern "rust-intrinsic" {
599596
///
600597
/// The `locality` argument must be a constant integer and is a temporal locality specifier
601598
/// ranging from (0) - no locality, to (3) - extremely local keep in cache
602-
#[cfg(not(stage0))]
603599
pub fn prefetch_write_instruction<T>(data: *const T, locality: i32);
604600
}
605601

606-
// Empty bootstrap implementations for stage0 compilation
607-
#[cfg(stage0)]
608-
pub fn prefetch_read_data<T>(_data: *const T, _locality: i32) { /* EMPTY */ }
609-
#[cfg(stage0)]
610-
pub fn prefetch_write_data<T>(_data: *const T, _locality: i32) { /* EMPTY */ }
611-
#[cfg(stage0)]
612-
pub fn prefetch_read_instruction<T>(_data: *const T, _locality: i32) { /* EMPTY */ }
613-
#[cfg(stage0)]
614-
pub fn prefetch_write_instruction<T>(_data: *const T, _locality: i32) { /* EMPTY */ }
615-
616602
extern "rust-intrinsic" {
617603

618604
pub fn atomic_fence();

src/libcore/ops/mod.rs

-3
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,6 @@ pub use self::range::{Range, RangeFrom, RangeFull, RangeTo};
186186
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
187187
pub use self::range::{RangeInclusive, RangeToInclusive};
188188

189-
#[unstable(feature = "question_mark_carrier", issue = "31436")]
190-
#[cfg(stage0)]
191-
pub use self::try::Carrier;
192189
#[unstable(feature = "try_trait", issue = "42327")]
193190
pub use self::try::Try;
194191

src/libcore/ops/try.rs

-64
Original file line numberDiff line numberDiff line change
@@ -8,70 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
/// This trait has been superseded by the `Try` trait, but must remain
12-
/// here as `?` is still lowered to it in stage0 .
13-
#[cfg(stage0)]
14-
#[unstable(feature = "question_mark_carrier", issue = "31436")]
15-
pub trait Carrier {
16-
/// The type of the value when computation succeeds.
17-
type Success;
18-
/// The type of the value when computation errors out.
19-
type Error;
20-
21-
/// Create a `Carrier` from a success value.
22-
fn from_success(_: Self::Success) -> Self;
23-
24-
/// Create a `Carrier` from an error value.
25-
fn from_error(_: Self::Error) -> Self;
26-
27-
/// Translate this `Carrier` to another implementation of `Carrier` with the
28-
/// same associated types.
29-
fn translate<T>(self) -> T where T: Carrier<Success=Self::Success, Error=Self::Error>;
30-
}
31-
32-
#[cfg(stage0)]
33-
#[unstable(feature = "question_mark_carrier", issue = "31436")]
34-
impl<U, V> Carrier for Result<U, V> {
35-
type Success = U;
36-
type Error = V;
37-
38-
fn from_success(u: U) -> Result<U, V> {
39-
Ok(u)
40-
}
41-
42-
fn from_error(e: V) -> Result<U, V> {
43-
Err(e)
44-
}
45-
46-
fn translate<T>(self) -> T
47-
where T: Carrier<Success=U, Error=V>
48-
{
49-
match self {
50-
Ok(u) => T::from_success(u),
51-
Err(e) => T::from_error(e),
52-
}
53-
}
54-
}
55-
56-
struct _DummyErrorType;
57-
58-
impl Try for _DummyErrorType {
59-
type Ok = ();
60-
type Error = ();
61-
62-
fn into_result(self) -> Result<Self::Ok, Self::Error> {
63-
Ok(())
64-
}
65-
66-
fn from_ok(_: ()) -> _DummyErrorType {
67-
_DummyErrorType
68-
}
69-
70-
fn from_error(_: ()) -> _DummyErrorType {
71-
_DummyErrorType
72-
}
73-
}
74-
7511
/// A trait for customizing the behaviour of the `?` operator.
7612
///
7713
/// A type implementing `Try` is one that has a canonical way to view it

src/libcore/slice/mod.rs

+6-15
Original file line numberDiff line numberDiff line change
@@ -1030,47 +1030,38 @@ impl<T> SliceIndex<[T]> for ops::RangeInclusive<usize> {
10301030
}
10311031
}
10321032

1033-
#[cfg(stage0)] // The bootstrap compiler has a different `...` desugar
1034-
fn inclusive(start: usize, end: usize) -> ops::RangeInclusive<usize> {
1035-
ops::RangeInclusive { start, end }
1036-
}
1037-
#[cfg(not(stage0))]
1038-
fn inclusive(start: usize, end: usize) -> ops::RangeInclusive<usize> {
1039-
start...end
1040-
}
1041-
10421033
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
10431034
impl<T> SliceIndex<[T]> for ops::RangeToInclusive<usize> {
10441035
type Output = [T];
10451036

10461037
#[inline]
10471038
fn get(self, slice: &[T]) -> Option<&[T]> {
1048-
inclusive(0, self.end).get(slice)
1039+
(0...self.end).get(slice)
10491040
}
10501041

10511042
#[inline]
10521043
fn get_mut(self, slice: &mut [T]) -> Option<&mut [T]> {
1053-
inclusive(0, self.end).get_mut(slice)
1044+
(0...self.end).get_mut(slice)
10541045
}
10551046

10561047
#[inline]
10571048
unsafe fn get_unchecked(self, slice: &[T]) -> &[T] {
1058-
inclusive(0, self.end).get_unchecked(slice)
1049+
(0...self.end).get_unchecked(slice)
10591050
}
10601051

10611052
#[inline]
10621053
unsafe fn get_unchecked_mut(self, slice: &mut [T]) -> &mut [T] {
1063-
inclusive(0, self.end).get_unchecked_mut(slice)
1054+
(0...self.end).get_unchecked_mut(slice)
10641055
}
10651056

10661057
#[inline]
10671058
fn index(self, slice: &[T]) -> &[T] {
1068-
inclusive(0, self.end).index(slice)
1059+
(0...self.end).index(slice)
10691060
}
10701061

10711062
#[inline]
10721063
fn index_mut(self, slice: &mut [T]) -> &mut [T] {
1073-
inclusive(0, self.end).index_mut(slice)
1064+
(0...self.end).index_mut(slice)
10741065
}
10751066
}
10761067

src/libflate/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
//! [mz]: https://code.google.com/p/miniz/
1616
1717
#![crate_name = "flate"]
18-
#![cfg_attr(stage0, unstable(feature = "rustc_private", issue = "27812"))]
1918
#![crate_type = "rlib"]
2019
#![crate_type = "dylib"]
2120
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@@ -25,7 +24,6 @@
2524
#![deny(warnings)]
2625

2726
#![feature(libc)]
28-
#![cfg_attr(stage0, feature(staged_api))]
2927
#![feature(unique)]
3028
#![cfg_attr(test, feature(rand))]
3129

src/libfmt_macros/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
//! generated instead.
1616
1717
#![crate_name = "fmt_macros"]
18-
#![cfg_attr(stage0, unstable(feature = "rustc_private", issue = "27812"))]
1918
#![crate_type = "rlib"]
2019
#![crate_type = "dylib"]
2120
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@@ -25,9 +24,6 @@
2524
test(attr(deny(warnings))))]
2625
#![deny(warnings)]
2726

28-
#![cfg_attr(stage0, feature(staged_api))]
29-
#![feature(rustc_private)]
30-
3127
pub use self::Piece::*;
3228
pub use self::Position::*;
3329
pub use self::Alignment::*;

0 commit comments

Comments
 (0)