Rollup merge of #70029 - jonas-schievink:bootstrap, r=Centril
Bump the bootstrap compiler
This commit is contained in:
commit
f907598ba4
|
@ -725,7 +725,7 @@ impl<'a> Builder<'a> {
|
||||||
self.clear_if_dirty(&my_out, &rustdoc);
|
self.clear_if_dirty(&my_out, &rustdoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
cargo.env("CARGO_TARGET_DIR", &out_dir).arg(cmd).arg("-Zconfig-profile");
|
cargo.env("CARGO_TARGET_DIR", &out_dir).arg(cmd);
|
||||||
|
|
||||||
let profile_var = |name: &str| {
|
let profile_var = |name: &str| {
|
||||||
let profile = if self.config.rust_optimize { "RELEASE" } else { "DEV" };
|
let profile = if self.config.rust_optimize { "RELEASE" } else { "DEV" };
|
||||||
|
@ -847,13 +847,7 @@ impl<'a> Builder<'a> {
|
||||||
rustflags.arg("-Zforce-unstable-if-unmarked");
|
rustflags.arg("-Zforce-unstable-if-unmarked");
|
||||||
}
|
}
|
||||||
|
|
||||||
// cfg(bootstrap): the flag was renamed from `-Zexternal-macro-backtrace`
|
rustflags.arg("-Zmacro-backtrace");
|
||||||
// to `-Zmacro-backtrace`, keep only the latter after beta promotion.
|
|
||||||
if stage == 0 {
|
|
||||||
rustflags.arg("-Zexternal-macro-backtrace");
|
|
||||||
} else {
|
|
||||||
rustflags.arg("-Zmacro-backtrace");
|
|
||||||
}
|
|
||||||
|
|
||||||
let want_rustdoc = self.doc_tests != DocTests::No;
|
let want_rustdoc = self.doc_tests != DocTests::No;
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ use build_helper::output;
|
||||||
use crate::Build;
|
use crate::Build;
|
||||||
|
|
||||||
// The version number
|
// The version number
|
||||||
pub const CFG_RELEASE_NUM: &str = "1.43.0";
|
pub const CFG_RELEASE_NUM: &str = "1.44.0";
|
||||||
|
|
||||||
pub struct GitInfo {
|
pub struct GitInfo {
|
||||||
inner: Option<Info>,
|
inner: Option<Info>,
|
||||||
|
|
|
@ -1105,29 +1105,6 @@ impl<T: ?Sized> AsMut<T> for Box<T> {
|
||||||
#[stable(feature = "pin", since = "1.33.0")]
|
#[stable(feature = "pin", since = "1.33.0")]
|
||||||
impl<T: ?Sized> Unpin for Box<T> {}
|
impl<T: ?Sized> Unpin for Box<T> {}
|
||||||
|
|
||||||
#[cfg(bootstrap)]
|
|
||||||
#[unstable(feature = "generator_trait", issue = "43122")]
|
|
||||||
impl<G: ?Sized + Generator + Unpin> Generator for Box<G> {
|
|
||||||
type Yield = G::Yield;
|
|
||||||
type Return = G::Return;
|
|
||||||
|
|
||||||
fn resume(mut self: Pin<&mut Self>) -> GeneratorState<Self::Yield, Self::Return> {
|
|
||||||
G::resume(Pin::new(&mut *self))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(bootstrap)]
|
|
||||||
#[unstable(feature = "generator_trait", issue = "43122")]
|
|
||||||
impl<G: ?Sized + Generator> Generator for Pin<Box<G>> {
|
|
||||||
type Yield = G::Yield;
|
|
||||||
type Return = G::Return;
|
|
||||||
|
|
||||||
fn resume(mut self: Pin<&mut Self>) -> GeneratorState<Self::Yield, Self::Return> {
|
|
||||||
G::resume((*self).as_mut())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "generator_trait", issue = "43122")]
|
#[unstable(feature = "generator_trait", issue = "43122")]
|
||||||
impl<G: ?Sized + Generator<R> + Unpin, R> Generator<R> for Box<G> {
|
impl<G: ?Sized + Generator<R> + Unpin, R> Generator<R> for Box<G> {
|
||||||
type Yield = G::Yield;
|
type Yield = G::Yield;
|
||||||
|
@ -1138,7 +1115,6 @@ impl<G: ?Sized + Generator<R> + Unpin, R> Generator<R> for Box<G> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "generator_trait", issue = "43122")]
|
#[unstable(feature = "generator_trait", issue = "43122")]
|
||||||
impl<G: ?Sized + Generator<R>, R> Generator<R> for Pin<Box<G>> {
|
impl<G: ?Sized + Generator<R>, R> Generator<R> for Pin<Box<G>> {
|
||||||
type Yield = G::Yield;
|
type Yield = G::Yield;
|
||||||
|
|
|
@ -1569,7 +1569,7 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
|
||||||
#[lang = "unsafe_cell"]
|
#[lang = "unsafe_cell"]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
#[cfg_attr(not(bootstrap), repr(no_niche))] // rust-lang/rust#68303.
|
#[repr(no_niche)] // rust-lang/rust#68303.
|
||||||
pub struct UnsafeCell<T: ?Sized> {
|
pub struct UnsafeCell<T: ?Sized> {
|
||||||
value: T,
|
value: T,
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,7 @@
|
||||||
#![feature(associated_type_bounds)]
|
#![feature(associated_type_bounds)]
|
||||||
#![feature(const_type_id)]
|
#![feature(const_type_id)]
|
||||||
#![feature(const_caller_location)]
|
#![feature(const_caller_location)]
|
||||||
#![cfg_attr(not(bootstrap), feature(no_niche))] // rust-lang/rust#68303
|
#![feature(no_niche)] // rust-lang/rust#68303
|
||||||
|
|
||||||
#[prelude_import]
|
#[prelude_import]
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
|
|
|
@ -67,7 +67,7 @@ pub enum GeneratorState<Y, R> {
|
||||||
#[lang = "generator"]
|
#[lang = "generator"]
|
||||||
#[unstable(feature = "generator_trait", issue = "43122")]
|
#[unstable(feature = "generator_trait", issue = "43122")]
|
||||||
#[fundamental]
|
#[fundamental]
|
||||||
pub trait Generator<#[cfg(not(bootstrap))] R = ()> {
|
pub trait Generator<R = ()> {
|
||||||
/// The type of value this generator yields.
|
/// The type of value this generator yields.
|
||||||
///
|
///
|
||||||
/// This associated type corresponds to the `yield` expression and the
|
/// This associated type corresponds to the `yield` expression and the
|
||||||
|
@ -110,35 +110,9 @@ pub trait Generator<#[cfg(not(bootstrap))] R = ()> {
|
||||||
/// been returned previously. While generator literals in the language are
|
/// been returned previously. While generator literals in the language are
|
||||||
/// guaranteed to panic on resuming after `Complete`, this is not guaranteed
|
/// guaranteed to panic on resuming after `Complete`, this is not guaranteed
|
||||||
/// for all implementations of the `Generator` trait.
|
/// for all implementations of the `Generator` trait.
|
||||||
fn resume(
|
fn resume(self: Pin<&mut Self>, arg: R) -> GeneratorState<Self::Yield, Self::Return>;
|
||||||
self: Pin<&mut Self>,
|
|
||||||
#[cfg(not(bootstrap))] arg: R,
|
|
||||||
) -> GeneratorState<Self::Yield, Self::Return>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(bootstrap)]
|
|
||||||
#[unstable(feature = "generator_trait", issue = "43122")]
|
|
||||||
impl<G: ?Sized + Generator> Generator for Pin<&mut G> {
|
|
||||||
type Yield = G::Yield;
|
|
||||||
type Return = G::Return;
|
|
||||||
|
|
||||||
fn resume(mut self: Pin<&mut Self>) -> GeneratorState<Self::Yield, Self::Return> {
|
|
||||||
G::resume((*self).as_mut())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(bootstrap)]
|
|
||||||
#[unstable(feature = "generator_trait", issue = "43122")]
|
|
||||||
impl<G: ?Sized + Generator + Unpin> Generator for &mut G {
|
|
||||||
type Yield = G::Yield;
|
|
||||||
type Return = G::Return;
|
|
||||||
|
|
||||||
fn resume(mut self: Pin<&mut Self>) -> GeneratorState<Self::Yield, Self::Return> {
|
|
||||||
G::resume(Pin::new(&mut *self))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "generator_trait", issue = "43122")]
|
#[unstable(feature = "generator_trait", issue = "43122")]
|
||||||
impl<G: ?Sized + Generator<R>, R> Generator<R> for Pin<&mut G> {
|
impl<G: ?Sized + Generator<R>, R> Generator<R> for Pin<&mut G> {
|
||||||
type Yield = G::Yield;
|
type Yield = G::Yield;
|
||||||
|
@ -149,7 +123,6 @@ impl<G: ?Sized + Generator<R>, R> Generator<R> for Pin<&mut G> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "generator_trait", issue = "43122")]
|
#[unstable(feature = "generator_trait", issue = "43122")]
|
||||||
impl<G: ?Sized + Generator<R> + Unpin, R> Generator<R> for &mut G {
|
impl<G: ?Sized + Generator<R> + Unpin, R> Generator<R> for &mut G {
|
||||||
type Yield = G::Yield;
|
type Yield = G::Yield;
|
||||||
|
|
|
@ -25,22 +25,6 @@ pub struct PinnedGenerator<I, A, R> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I, A, R> PinnedGenerator<I, A, R> {
|
impl<I, A, R> PinnedGenerator<I, A, R> {
|
||||||
#[cfg(bootstrap)]
|
|
||||||
pub fn new<T: Generator<Yield = YieldType<I, A>, Return = R> + 'static>(
|
|
||||||
generator: T,
|
|
||||||
) -> (I, Self) {
|
|
||||||
let mut result = PinnedGenerator { generator: Box::pin(generator) };
|
|
||||||
|
|
||||||
// Run it to the first yield to set it up
|
|
||||||
let init = match Pin::new(&mut result.generator).resume() {
|
|
||||||
GeneratorState::Yielded(YieldType::Initial(y)) => y,
|
|
||||||
_ => panic!(),
|
|
||||||
};
|
|
||||||
|
|
||||||
(init, result)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub fn new<T: Generator<Yield = YieldType<I, A>, Return = R> + 'static>(
|
pub fn new<T: Generator<Yield = YieldType<I, A>, Return = R> + 'static>(
|
||||||
generator: T,
|
generator: T,
|
||||||
) -> (I, Self) {
|
) -> (I, Self) {
|
||||||
|
@ -55,19 +39,6 @@ impl<I, A, R> PinnedGenerator<I, A, R> {
|
||||||
(init, result)
|
(init, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(bootstrap)]
|
|
||||||
pub unsafe fn access(&mut self, closure: *mut dyn FnMut()) {
|
|
||||||
BOX_REGION_ARG.with(|i| {
|
|
||||||
i.set(Action::Access(AccessAction(closure)));
|
|
||||||
});
|
|
||||||
|
|
||||||
// Call the generator, which in turn will call the closure in BOX_REGION_ARG
|
|
||||||
if let GeneratorState::Complete(_) = Pin::new(&mut self.generator).resume() {
|
|
||||||
panic!()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub unsafe fn access(&mut self, closure: *mut dyn FnMut()) {
|
pub unsafe fn access(&mut self, closure: *mut dyn FnMut()) {
|
||||||
BOX_REGION_ARG.with(|i| {
|
BOX_REGION_ARG.with(|i| {
|
||||||
i.set(Action::Access(AccessAction(closure)));
|
i.set(Action::Access(AccessAction(closure)));
|
||||||
|
@ -79,16 +50,6 @@ impl<I, A, R> PinnedGenerator<I, A, R> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(bootstrap)]
|
|
||||||
pub fn complete(&mut self) -> R {
|
|
||||||
// Tell the generator we want it to complete, consuming it and yielding a result
|
|
||||||
BOX_REGION_ARG.with(|i| i.set(Action::Complete));
|
|
||||||
|
|
||||||
let result = Pin::new(&mut self.generator).resume();
|
|
||||||
if let GeneratorState::Complete(r) = result { r } else { panic!() }
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub fn complete(&mut self) -> R {
|
pub fn complete(&mut self) -> R {
|
||||||
// Tell the generator we want it to complete, consuming it and yielding a result
|
// Tell the generator we want it to complete, consuming it and yielding a result
|
||||||
BOX_REGION_ARG.with(|i| i.set(Action::Complete));
|
BOX_REGION_ARG.with(|i| i.set(Action::Complete));
|
||||||
|
|
|
@ -41,10 +41,7 @@ impl<T: Generator<Yield = ()>> Future for GenFuture<T> {
|
||||||
// Safe because we're !Unpin + !Drop mapping to a ?Unpin value
|
// Safe because we're !Unpin + !Drop mapping to a ?Unpin value
|
||||||
let gen = unsafe { Pin::map_unchecked_mut(self, |s| &mut s.0) };
|
let gen = unsafe { Pin::map_unchecked_mut(self, |s| &mut s.0) };
|
||||||
let _guard = unsafe { set_task_context(cx) };
|
let _guard = unsafe { set_task_context(cx) };
|
||||||
match gen.resume(
|
match gen.resume(()) {
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
(),
|
|
||||||
) {
|
|
||||||
GeneratorState::Yielded(()) => Poll::Pending,
|
GeneratorState::Yielded(()) => Poll::Pending,
|
||||||
GeneratorState::Complete(x) => Poll::Ready(x),
|
GeneratorState::Complete(x) => Poll::Ready(x),
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# source tarball for a stable release you'll likely see `1.x.0` for rustc and
|
# source tarball for a stable release you'll likely see `1.x.0` for rustc and
|
||||||
# `0.x.0` for Cargo where they were released on `date`.
|
# `0.x.0` for Cargo where they were released on `date`.
|
||||||
|
|
||||||
date: 2020-02-29
|
date: 2020-03-12
|
||||||
rustc: beta
|
rustc: beta
|
||||||
cargo: beta
|
cargo: beta
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue