Skip to content

Commit 90463a6

Browse files
committed
Auto merge of #50629 - Mark-Simulacrum:stage-step, r=alexcrichton
Switch to bootstrapping from 1.27 It's possible the Float trait could be removed from core, but I couldn't tell whether it was intended to be removed or not. @SimonSapin may be able to comment more here; we can presumably also do that in a follow up PR as this one is already quite large.
2 parents dbd10f8 + a22af69 commit 90463a6

File tree

43 files changed

+442
-1521
lines changed

Some content is hidden

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

43 files changed

+442
-1521
lines changed

src/bootstrap/builder.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -584,11 +584,10 @@ impl<'a> Builder<'a> {
584584
cargo.env("RUST_CHECK", "1");
585585
}
586586

587-
// If we were invoked from `make` then that's already got a jobserver
588-
// set up for us so no need to tell Cargo about jobs all over again.
589-
if env::var_os("MAKEFLAGS").is_none() && env::var_os("MFLAGS").is_none() {
590-
cargo.arg("-j").arg(self.jobs().to_string());
591-
}
587+
cargo.arg("-j").arg(self.jobs().to_string());
588+
// Remove make-related flags to ensure Cargo can correctly set things up
589+
cargo.env_remove("MAKEFLAGS");
590+
cargo.env_remove("MFLAGS");
592591

593592
// FIXME: Temporary fix for https://github.com/rust-lang/cargo/issues/3005
594593
// Force cargo to output binaries with disambiguating hashes in the name

src/bootstrap/channel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use Build;
2424
use config::Config;
2525

2626
// The version number
27-
pub const CFG_RELEASE_NUM: &str = "1.27.0";
27+
pub const CFG_RELEASE_NUM: &str = "1.28.0";
2828

2929
pub struct GitInfo {
3030
inner: Option<Info>,

src/bootstrap/compile.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ impl Step for Assemble {
972972

973973
// Link the compiler binary itself into place
974974
let out_dir = builder.cargo_out(build_compiler, Mode::Librustc, host);
975-
let rustc = out_dir.join(exe("rustc", &*host));
975+
let rustc = out_dir.join(exe("rustc_binary", &*host));
976976
let bindir = sysroot.join("bin");
977977
t!(fs::create_dir_all(&bindir));
978978
let compiler = builder.rustc(target_compiler);

src/bootstrap/tool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ impl Step for Rustdoc {
431431
// the wrong rustdoc being executed. To avoid the conflicting rustdocs, we name the "tool"
432432
// rustdoc a different name.
433433
let tool_rustdoc = builder.cargo_out(build_compiler, Mode::Tool, target)
434-
.join(exe("rustdoc-tool-binary", &target_compiler.host));
434+
.join(exe("rustdoc_tool_binary", &target_compiler.host));
435435

436436
// don't create a stage0-sysroot/bin directory.
437437
if target_compiler.stage > 0 {

src/liballoc/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
authors = ["The Rust Project Developers"]
33
name = "alloc"
44
version = "0.0.0"
5+
autotests = false
6+
autobenches = false
57

68
[lib]
79
name = "alloc"

src/liballoc/alloc.rs

+1-46
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,6 @@ use core::usize;
2222
#[doc(inline)]
2323
pub use core::alloc::*;
2424

25-
#[cfg(stage0)]
26-
extern "Rust" {
27-
#[allocator]
28-
#[rustc_allocator_nounwind]
29-
fn __rust_alloc(size: usize, align: usize, err: *mut u8) -> *mut u8;
30-
#[cold]
31-
#[rustc_allocator_nounwind]
32-
fn __rust_oom(err: *const u8) -> !;
33-
#[rustc_allocator_nounwind]
34-
fn __rust_dealloc(ptr: *mut u8, size: usize, align: usize);
35-
#[rustc_allocator_nounwind]
36-
fn __rust_realloc(ptr: *mut u8,
37-
old_size: usize,
38-
old_align: usize,
39-
new_size: usize,
40-
new_align: usize,
41-
err: *mut u8) -> *mut u8;
42-
#[rustc_allocator_nounwind]
43-
fn __rust_alloc_zeroed(size: usize, align: usize, err: *mut u8) -> *mut u8;
44-
}
45-
46-
#[cfg(not(stage0))]
4725
extern "Rust" {
4826
#[allocator]
4927
#[rustc_allocator_nounwind]
@@ -74,10 +52,7 @@ pub const Heap: Global = Global;
7452
unsafe impl GlobalAlloc for Global {
7553
#[inline]
7654
unsafe fn alloc(&self, layout: Layout) -> *mut Opaque {
77-
#[cfg(not(stage0))]
7855
let ptr = __rust_alloc(layout.size(), layout.align());
79-
#[cfg(stage0)]
80-
let ptr = __rust_alloc(layout.size(), layout.align(), &mut 0);
8156
ptr as *mut Opaque
8257
}
8358

@@ -88,20 +63,13 @@ unsafe impl GlobalAlloc for Global {
8863

8964
#[inline]
9065
unsafe fn realloc(&self, ptr: *mut Opaque, layout: Layout, new_size: usize) -> *mut Opaque {
91-
#[cfg(not(stage0))]
9266
let ptr = __rust_realloc(ptr as *mut u8, layout.size(), layout.align(), new_size);
93-
#[cfg(stage0)]
94-
let ptr = __rust_realloc(ptr as *mut u8, layout.size(), layout.align(),
95-
new_size, layout.align(), &mut 0);
9667
ptr as *mut Opaque
9768
}
9869

9970
#[inline]
10071
unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut Opaque {
101-
#[cfg(not(stage0))]
10272
let ptr = __rust_alloc_zeroed(layout.size(), layout.align());
103-
#[cfg(stage0)]
104-
let ptr = __rust_alloc_zeroed(layout.size(), layout.align(), &mut 0);
10573
ptr as *mut Opaque
10674
}
10775
}
@@ -152,14 +120,7 @@ unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 {
152120
}
153121
}
154122

155-
#[cfg(stage0)]
156-
#[lang = "box_free"]
157-
#[inline]
158-
unsafe fn old_box_free<T: ?Sized>(ptr: *mut T) {
159-
box_free(Unique::new_unchecked(ptr))
160-
}
161-
162-
#[cfg_attr(not(any(test, stage0)), lang = "box_free")]
123+
#[cfg_attr(not(test), lang = "box_free")]
163124
#[inline]
164125
pub(crate) unsafe fn box_free<T: ?Sized>(ptr: Unique<T>) {
165126
let ptr = ptr.as_ptr();
@@ -172,12 +133,6 @@ pub(crate) unsafe fn box_free<T: ?Sized>(ptr: Unique<T>) {
172133
}
173134
}
174135

175-
#[cfg(stage0)]
176-
pub fn oom() -> ! {
177-
unsafe { ::core::intrinsics::abort() }
178-
}
179-
180-
#[cfg(not(stage0))]
181136
pub fn oom() -> ! {
182137
extern {
183138
#[lang = "oom"]

src/liballoc/lib.rs

-10
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
#![deny(missing_debug_implementations)]
7676

7777
#![cfg_attr(test, allow(deprecated))] // rand
78-
#![cfg_attr(all(not(test), stage0), feature(float_internals))]
7978
#![cfg_attr(not(test), feature(exact_size_is_empty))]
8079
#![cfg_attr(not(test), feature(generator_trait))]
8180
#![cfg_attr(test, feature(rand, test))]
@@ -90,13 +89,10 @@
9089
#![feature(collections_range)]
9190
#![feature(const_fn)]
9291
#![feature(core_intrinsics)]
93-
#![cfg_attr(stage0, feature(core_slice_ext))]
94-
#![cfg_attr(stage0, feature(core_str_ext))]
9592
#![feature(custom_attribute)]
9693
#![feature(dropck_eyepatch)]
9794
#![feature(exact_size_is_empty)]
9895
#![feature(fmt_internals)]
99-
#![cfg_attr(stage0, feature(fn_must_use))]
10096
#![feature(from_ref)]
10197
#![feature(fundamental)]
10298
#![feature(lang_items)]
@@ -122,7 +118,6 @@
122118
#![feature(exact_chunks)]
123119
#![feature(pointer_methods)]
124120
#![feature(inclusive_range_methods)]
125-
#![cfg_attr(stage0, feature(generic_param_attrs))]
126121
#![feature(rustc_const_unstable)]
127122
#![feature(const_vec_new)]
128123

@@ -157,15 +152,10 @@ pub mod alloc;
157152
#[unstable(feature = "allocator_api", issue = "32838")]
158153
#[rustc_deprecated(since = "1.27.0", reason = "module renamed to `alloc`")]
159154
/// Use the `alloc` module instead.
160-
#[cfg(not(stage0))]
161155
pub mod heap {
162156
pub use alloc::*;
163157
}
164158

165-
#[unstable(feature = "allocator_api", issue = "32838")]
166-
#[rustc_deprecated(since = "1.27.0", reason = "module renamed to `alloc`")]
167-
#[cfg(stage0)]
168-
pub mod heap;
169159

170160
// Primitive types using the heaps above
171161

src/liballoc/slice.rs

+2-11
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ use core::cmp::Ordering::{self, Less};
101101
use core::mem::size_of;
102102
use core::mem;
103103
use core::ptr;
104-
#[cfg(stage0)] use core::slice::SliceExt;
105104
use core::{u8, u16, u32};
106105

107106
use borrow::{Borrow, BorrowMut, ToOwned};
@@ -171,13 +170,9 @@ mod hack {
171170
}
172171
}
173172

174-
#[cfg_attr(stage0, lang = "slice")]
175-
#[cfg_attr(not(stage0), lang = "slice_alloc")]
173+
#[lang = "slice_alloc"]
176174
#[cfg(not(test))]
177175
impl<T> [T] {
178-
#[cfg(stage0)]
179-
slice_core_methods!();
180-
181176
/// Sorts the slice.
182177
///
183178
/// This sort is stable (i.e. does not reorder equal elements) and `O(n log n)` worst-case.
@@ -467,8 +462,7 @@ impl<T> [T] {
467462
}
468463
}
469464

470-
#[cfg_attr(stage0, lang = "slice_u8")]
471-
#[cfg_attr(not(stage0), lang = "slice_u8_alloc")]
465+
#[lang = "slice_u8_alloc"]
472466
#[cfg(not(test))]
473467
impl [u8] {
474468
/// Returns a vector containing a copy of this slice where each byte
@@ -504,9 +498,6 @@ impl [u8] {
504498
me.make_ascii_lowercase();
505499
me
506500
}
507-
508-
#[cfg(stage0)]
509-
slice_u8_core_methods!();
510501
}
511502

512503
////////////////////////////////////////////////////////////////////////////////

src/liballoc/str.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040

4141
use core::fmt;
4242
use core::str as core_str;
43-
#[cfg(stage0)] use core::str::StrExt;
4443
use core::str::pattern::Pattern;
4544
use core::str::pattern::{Searcher, ReverseSearcher, DoubleEndedSearcher};
4645
use core::mem;
@@ -158,13 +157,9 @@ impl ToOwned for str {
158157
}
159158

160159
/// Methods for string slices.
161-
#[cfg_attr(stage0, lang = "str")]
162-
#[cfg_attr(not(stage0), lang = "str_alloc")]
160+
#[lang = "str_alloc"]
163161
#[cfg(not(test))]
164162
impl str {
165-
#[cfg(stage0)]
166-
str_core_methods!();
167-
168163
/// Converts a `Box<str>` into a `Box<[u8]>` without copying or allocating.
169164
///
170165
/// # Examples

src/liballoc/vec.rs

-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ use core::intrinsics::{arith_offset, assume};
7373
use core::iter::{FromIterator, FusedIterator, TrustedLen};
7474
use core::marker::PhantomData;
7575
use core::mem;
76-
#[cfg(not(test))]
77-
#[cfg(stage0)]
78-
use core::num::Float;
7976
use core::ops::Bound::{Excluded, Included, Unbounded};
8077
use core::ops::{Index, IndexMut, RangeBounds};
8178
use core::ops;

src/liballoc_jemalloc/lib.rs

-7
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,6 @@ mod contents {
9797
ptr
9898
}
9999

100-
#[cfg(stage0)]
101-
#[no_mangle]
102-
#[rustc_std_internal_symbol]
103-
pub unsafe extern fn __rde_oom() -> ! {
104-
::core::intrinsics::abort();
105-
}
106-
107100
#[no_mangle]
108101
#[rustc_std_internal_symbol]
109102
pub unsafe extern fn __rde_dealloc(ptr: *mut u8,

src/liballoc_system/lib.rs

-27
Original file line numberDiff line numberDiff line change
@@ -73,33 +73,6 @@ unsafe impl Alloc for System {
7373
}
7474
}
7575

76-
#[cfg(stage0)]
77-
#[unstable(feature = "allocator_api", issue = "32838")]
78-
unsafe impl<'a> Alloc for &'a System {
79-
#[inline]
80-
unsafe fn alloc(&mut self, layout: Layout) -> Result<NonNull<Opaque>, AllocErr> {
81-
NonNull::new(GlobalAlloc::alloc(*self, layout)).ok_or(AllocErr)
82-
}
83-
84-
#[inline]
85-
unsafe fn alloc_zeroed(&mut self, layout: Layout) -> Result<NonNull<Opaque>, AllocErr> {
86-
NonNull::new(GlobalAlloc::alloc_zeroed(*self, layout)).ok_or(AllocErr)
87-
}
88-
89-
#[inline]
90-
unsafe fn dealloc(&mut self, ptr: NonNull<Opaque>, layout: Layout) {
91-
GlobalAlloc::dealloc(*self, ptr.as_ptr(), layout)
92-
}
93-
94-
#[inline]
95-
unsafe fn realloc(&mut self,
96-
ptr: NonNull<Opaque>,
97-
layout: Layout,
98-
new_size: usize) -> Result<NonNull<Opaque>, AllocErr> {
99-
NonNull::new(GlobalAlloc::realloc(*self, ptr.as_ptr(), layout, new_size)).ok_or(AllocErr)
100-
}
101-
}
102-
10376
#[cfg(any(windows, unix, target_os = "cloudabi", target_os = "redox"))]
10477
mod realloc_fallback {
10578
use core::alloc::{GlobalAlloc, Opaque, Layout};

src/libarena/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#![feature(alloc)]
2727
#![feature(core_intrinsics)]
2828
#![feature(dropck_eyepatch)]
29-
#![cfg_attr(stage0, feature(generic_param_attrs))]
3029
#![cfg_attr(test, feature(test))]
3130

3231
#![allow(deprecated)]

src/libcore/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
authors = ["The Rust Project Developers"]
33
name = "core"
44
version = "0.0.0"
5+
autotests = false
6+
autobenches = false
57

68
[lib]
79
name = "core"

src/libcore/clone.rs

-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ pub struct AssertParamIsCopy<T: Copy + ?Sized> { _field: ::marker::PhantomData<T
153153
///
154154
/// Implementations that cannot be described in Rust
155155
/// are implemented in `SelectionContext::copy_clone_conditions()` in librustc.
156-
#[cfg(not(stage0))]
157156
mod impls {
158157

159158
use super::Clone;

src/libcore/internal_macros.rs

-14
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,3 @@ macro_rules! forward_ref_op_assign {
8686
}
8787
}
8888
}
89-
90-
#[cfg(stage0)]
91-
macro_rules! public_in_stage0 {
92-
( { $(#[$attr:meta])* } $($Item: tt)*) => {
93-
$(#[$attr])* pub $($Item)*
94-
}
95-
}
96-
97-
#[cfg(not(stage0))]
98-
macro_rules! public_in_stage0 {
99-
( { $(#[$attr:meta])* } $($Item: tt)*) => {
100-
$(#[$attr])* pub(crate) $($Item)*
101-
}
102-
}

src/libcore/lib.rs

+7-12
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,13 @@
112112
#![feature(unwind_attributes)]
113113
#![feature(doc_alias)]
114114
#![feature(inclusive_range_methods)]
115-
116-
#![cfg_attr(not(stage0), feature(mmx_target_feature))]
117-
#![cfg_attr(not(stage0), feature(tbm_target_feature))]
118-
#![cfg_attr(not(stage0), feature(sse4a_target_feature))]
119-
#![cfg_attr(not(stage0), feature(arm_target_feature))]
120-
#![cfg_attr(not(stage0), feature(powerpc_target_feature))]
121-
#![cfg_attr(not(stage0), feature(mips_target_feature))]
122-
#![cfg_attr(not(stage0), feature(aarch64_target_feature))]
123-
124-
#![cfg_attr(stage0, feature(target_feature))]
125-
#![cfg_attr(stage0, feature(cfg_target_feature))]
126-
#![cfg_attr(stage0, feature(fn_must_use))]
115+
#![feature(mmx_target_feature)]
116+
#![feature(tbm_target_feature)]
117+
#![feature(sse4a_target_feature)]
118+
#![feature(arm_target_feature)]
119+
#![feature(powerpc_target_feature)]
120+
#![feature(mips_target_feature)]
121+
#![feature(aarch64_target_feature)]
127122

128123
#[prelude_import]
129124
#[allow(unused)]

src/libcore/marker.rs

-1
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,6 @@ pub unsafe auto trait Unpin {}
611611
///
612612
/// Implementations that cannot be described in Rust
613613
/// are implemented in `SelectionContext::copy_clone_conditions()` in librustc.
614-
#[cfg(not(stage0))]
615614
mod copy_impls {
616615

617616
use super::Copy;

0 commit comments

Comments
 (0)