Skip to content

Commit 2bc6c0e

Browse files
authored
Rollup merge of rust-lang#70029 - jonas-schievink:bootstrap, r=Centril
Bump the bootstrap compiler
2 parents 8739293 + f53f9a8 commit 2bc6c0e

File tree

9 files changed

+9
-108
lines changed

9 files changed

+9
-108
lines changed

src/bootstrap/builder.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ impl<'a> Builder<'a> {
725725
self.clear_if_dirty(&my_out, &rustdoc);
726726
}
727727

728-
cargo.env("CARGO_TARGET_DIR", &out_dir).arg(cmd).arg("-Zconfig-profile");
728+
cargo.env("CARGO_TARGET_DIR", &out_dir).arg(cmd);
729729

730730
let profile_var = |name: &str| {
731731
let profile = if self.config.rust_optimize { "RELEASE" } else { "DEV" };
@@ -847,13 +847,7 @@ impl<'a> Builder<'a> {
847847
rustflags.arg("-Zforce-unstable-if-unmarked");
848848
}
849849

850-
// cfg(bootstrap): the flag was renamed from `-Zexternal-macro-backtrace`
851-
// to `-Zmacro-backtrace`, keep only the latter after beta promotion.
852-
if stage == 0 {
853-
rustflags.arg("-Zexternal-macro-backtrace");
854-
} else {
855-
rustflags.arg("-Zmacro-backtrace");
856-
}
850+
rustflags.arg("-Zmacro-backtrace");
857851

858852
let want_rustdoc = self.doc_tests != DocTests::No;
859853

src/bootstrap/channel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use build_helper::output;
1313
use crate::Build;
1414

1515
// The version number
16-
pub const CFG_RELEASE_NUM: &str = "1.43.0";
16+
pub const CFG_RELEASE_NUM: &str = "1.44.0";
1717

1818
pub struct GitInfo {
1919
inner: Option<Info>,

src/liballoc/boxed.rs

-24
Original file line numberDiff line numberDiff line change
@@ -1105,29 +1105,6 @@ impl<T: ?Sized> AsMut<T> for Box<T> {
11051105
#[stable(feature = "pin", since = "1.33.0")]
11061106
impl<T: ?Sized> Unpin for Box<T> {}
11071107

1108-
#[cfg(bootstrap)]
1109-
#[unstable(feature = "generator_trait", issue = "43122")]
1110-
impl<G: ?Sized + Generator + Unpin> Generator for Box<G> {
1111-
type Yield = G::Yield;
1112-
type Return = G::Return;
1113-
1114-
fn resume(mut self: Pin<&mut Self>) -> GeneratorState<Self::Yield, Self::Return> {
1115-
G::resume(Pin::new(&mut *self))
1116-
}
1117-
}
1118-
1119-
#[cfg(bootstrap)]
1120-
#[unstable(feature = "generator_trait", issue = "43122")]
1121-
impl<G: ?Sized + Generator> Generator for Pin<Box<G>> {
1122-
type Yield = G::Yield;
1123-
type Return = G::Return;
1124-
1125-
fn resume(mut self: Pin<&mut Self>) -> GeneratorState<Self::Yield, Self::Return> {
1126-
G::resume((*self).as_mut())
1127-
}
1128-
}
1129-
1130-
#[cfg(not(bootstrap))]
11311108
#[unstable(feature = "generator_trait", issue = "43122")]
11321109
impl<G: ?Sized + Generator<R> + Unpin, R> Generator<R> for Box<G> {
11331110
type Yield = G::Yield;
@@ -1138,7 +1115,6 @@ impl<G: ?Sized + Generator<R> + Unpin, R> Generator<R> for Box<G> {
11381115
}
11391116
}
11401117

1141-
#[cfg(not(bootstrap))]
11421118
#[unstable(feature = "generator_trait", issue = "43122")]
11431119
impl<G: ?Sized + Generator<R>, R> Generator<R> for Pin<Box<G>> {
11441120
type Yield = G::Yield;

src/libcore/cell.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1569,7 +1569,7 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
15691569
#[lang = "unsafe_cell"]
15701570
#[stable(feature = "rust1", since = "1.0.0")]
15711571
#[repr(transparent)]
1572-
#[cfg_attr(not(bootstrap), repr(no_niche))] // rust-lang/rust#68303.
1572+
#[repr(no_niche)] // rust-lang/rust#68303.
15731573
pub struct UnsafeCell<T: ?Sized> {
15741574
value: T,
15751575
}

src/libcore/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
#![feature(associated_type_bounds)]
141141
#![feature(const_type_id)]
142142
#![feature(const_caller_location)]
143-
#![cfg_attr(not(bootstrap), feature(no_niche))] // rust-lang/rust#68303
143+
#![feature(no_niche)] // rust-lang/rust#68303
144144

145145
#[prelude_import]
146146
#[allow(unused)]

src/libcore/ops/generator.rs

+2-29
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub enum GeneratorState<Y, R> {
6767
#[lang = "generator"]
6868
#[unstable(feature = "generator_trait", issue = "43122")]
6969
#[fundamental]
70-
pub trait Generator<#[cfg(not(bootstrap))] R = ()> {
70+
pub trait Generator<R = ()> {
7171
/// The type of value this generator yields.
7272
///
7373
/// This associated type corresponds to the `yield` expression and the
@@ -110,35 +110,9 @@ pub trait Generator<#[cfg(not(bootstrap))] R = ()> {
110110
/// been returned previously. While generator literals in the language are
111111
/// guaranteed to panic on resuming after `Complete`, this is not guaranteed
112112
/// for all implementations of the `Generator` trait.
113-
fn resume(
114-
self: Pin<&mut Self>,
115-
#[cfg(not(bootstrap))] arg: R,
116-
) -> GeneratorState<Self::Yield, Self::Return>;
113+
fn resume(self: Pin<&mut Self>, arg: R) -> GeneratorState<Self::Yield, Self::Return>;
117114
}
118115

119-
#[cfg(bootstrap)]
120-
#[unstable(feature = "generator_trait", issue = "43122")]
121-
impl<G: ?Sized + Generator> Generator for Pin<&mut G> {
122-
type Yield = G::Yield;
123-
type Return = G::Return;
124-
125-
fn resume(mut self: Pin<&mut Self>) -> GeneratorState<Self::Yield, Self::Return> {
126-
G::resume((*self).as_mut())
127-
}
128-
}
129-
130-
#[cfg(bootstrap)]
131-
#[unstable(feature = "generator_trait", issue = "43122")]
132-
impl<G: ?Sized + Generator + Unpin> Generator for &mut G {
133-
type Yield = G::Yield;
134-
type Return = G::Return;
135-
136-
fn resume(mut self: Pin<&mut Self>) -> GeneratorState<Self::Yield, Self::Return> {
137-
G::resume(Pin::new(&mut *self))
138-
}
139-
}
140-
141-
#[cfg(not(bootstrap))]
142116
#[unstable(feature = "generator_trait", issue = "43122")]
143117
impl<G: ?Sized + Generator<R>, R> Generator<R> for Pin<&mut G> {
144118
type Yield = G::Yield;
@@ -149,7 +123,6 @@ impl<G: ?Sized + Generator<R>, R> Generator<R> for Pin<&mut G> {
149123
}
150124
}
151125

152-
#[cfg(not(bootstrap))]
153126
#[unstable(feature = "generator_trait", issue = "43122")]
154127
impl<G: ?Sized + Generator<R> + Unpin, R> Generator<R> for &mut G {
155128
type Yield = G::Yield;

src/librustc_data_structures/box_region.rs

-39
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,6 @@ pub struct PinnedGenerator<I, A, R> {
2525
}
2626

2727
impl<I, A, R> PinnedGenerator<I, A, R> {
28-
#[cfg(bootstrap)]
29-
pub fn new<T: Generator<Yield = YieldType<I, A>, Return = R> + 'static>(
30-
generator: T,
31-
) -> (I, Self) {
32-
let mut result = PinnedGenerator { generator: Box::pin(generator) };
33-
34-
// Run it to the first yield to set it up
35-
let init = match Pin::new(&mut result.generator).resume() {
36-
GeneratorState::Yielded(YieldType::Initial(y)) => y,
37-
_ => panic!(),
38-
};
39-
40-
(init, result)
41-
}
42-
43-
#[cfg(not(bootstrap))]
4428
pub fn new<T: Generator<Yield = YieldType<I, A>, Return = R> + 'static>(
4529
generator: T,
4630
) -> (I, Self) {
@@ -55,19 +39,6 @@ impl<I, A, R> PinnedGenerator<I, A, R> {
5539
(init, result)
5640
}
5741

58-
#[cfg(bootstrap)]
59-
pub unsafe fn access(&mut self, closure: *mut dyn FnMut()) {
60-
BOX_REGION_ARG.with(|i| {
61-
i.set(Action::Access(AccessAction(closure)));
62-
});
63-
64-
// Call the generator, which in turn will call the closure in BOX_REGION_ARG
65-
if let GeneratorState::Complete(_) = Pin::new(&mut self.generator).resume() {
66-
panic!()
67-
}
68-
}
69-
70-
#[cfg(not(bootstrap))]
7142
pub unsafe fn access(&mut self, closure: *mut dyn FnMut()) {
7243
BOX_REGION_ARG.with(|i| {
7344
i.set(Action::Access(AccessAction(closure)));
@@ -79,16 +50,6 @@ impl<I, A, R> PinnedGenerator<I, A, R> {
7950
}
8051
}
8152

82-
#[cfg(bootstrap)]
83-
pub fn complete(&mut self) -> R {
84-
// Tell the generator we want it to complete, consuming it and yielding a result
85-
BOX_REGION_ARG.with(|i| i.set(Action::Complete));
86-
87-
let result = Pin::new(&mut self.generator).resume();
88-
if let GeneratorState::Complete(r) = result { r } else { panic!() }
89-
}
90-
91-
#[cfg(not(bootstrap))]
9253
pub fn complete(&mut self) -> R {
9354
// Tell the generator we want it to complete, consuming it and yielding a result
9455
BOX_REGION_ARG.with(|i| i.set(Action::Complete));

src/libstd/future.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ impl<T: Generator<Yield = ()>> Future for GenFuture<T> {
4141
// Safe because we're !Unpin + !Drop mapping to a ?Unpin value
4242
let gen = unsafe { Pin::map_unchecked_mut(self, |s| &mut s.0) };
4343
let _guard = unsafe { set_task_context(cx) };
44-
match gen.resume(
45-
#[cfg(not(bootstrap))]
46-
(),
47-
) {
44+
match gen.resume(()) {
4845
GeneratorState::Yielded(()) => Poll::Pending,
4946
GeneratorState::Complete(x) => Poll::Ready(x),
5047
}

src/stage0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# source tarball for a stable release you'll likely see `1.x.0` for rustc and
1313
# `0.x.0` for Cargo where they were released on `date`.
1414

15-
date: 2020-02-29
15+
date: 2020-03-12
1616
rustc: beta
1717
cargo: beta
1818

0 commit comments

Comments
 (0)