提交 90463a6b 编写于 作者: B bors

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.
......@@ -584,11 +584,10 @@ pub fn cargo(&self,
cargo.env("RUST_CHECK", "1");
}
// If we were invoked from `make` then that's already got a jobserver
// set up for us so no need to tell Cargo about jobs all over again.
if env::var_os("MAKEFLAGS").is_none() && env::var_os("MFLAGS").is_none() {
cargo.arg("-j").arg(self.jobs().to_string());
}
cargo.arg("-j").arg(self.jobs().to_string());
// Remove make-related flags to ensure Cargo can correctly set things up
cargo.env_remove("MAKEFLAGS");
cargo.env_remove("MFLAGS");
// FIXME: Temporary fix for https://github.com/rust-lang/cargo/issues/3005
// Force cargo to output binaries with disambiguating hashes in the name
......
......@@ -24,7 +24,7 @@
use config::Config;
// The version number
pub const CFG_RELEASE_NUM: &str = "1.27.0";
pub const CFG_RELEASE_NUM: &str = "1.28.0";
pub struct GitInfo {
inner: Option<Info>,
......
......@@ -972,7 +972,7 @@ fn run(self, builder: &Builder) -> Compiler {
// Link the compiler binary itself into place
let out_dir = builder.cargo_out(build_compiler, Mode::Librustc, host);
let rustc = out_dir.join(exe("rustc", &*host));
let rustc = out_dir.join(exe("rustc_binary", &*host));
let bindir = sysroot.join("bin");
t!(fs::create_dir_all(&bindir));
let compiler = builder.rustc(target_compiler);
......
......@@ -431,7 +431,7 @@ fn run(self, builder: &Builder) -> PathBuf {
// the wrong rustdoc being executed. To avoid the conflicting rustdocs, we name the "tool"
// rustdoc a different name.
let tool_rustdoc = builder.cargo_out(build_compiler, Mode::Tool, target)
.join(exe("rustdoc-tool-binary", &target_compiler.host));
.join(exe("rustdoc_tool_binary", &target_compiler.host));
// don't create a stage0-sysroot/bin directory.
if target_compiler.stage > 0 {
......
......@@ -2,6 +2,8 @@
authors = ["The Rust Project Developers"]
name = "alloc"
version = "0.0.0"
autotests = false
autobenches = false
[lib]
name = "alloc"
......
......@@ -22,28 +22,6 @@
#[doc(inline)]
pub use core::alloc::*;
#[cfg(stage0)]
extern "Rust" {
#[allocator]
#[rustc_allocator_nounwind]
fn __rust_alloc(size: usize, align: usize, err: *mut u8) -> *mut u8;
#[cold]
#[rustc_allocator_nounwind]
fn __rust_oom(err: *const u8) -> !;
#[rustc_allocator_nounwind]
fn __rust_dealloc(ptr: *mut u8, size: usize, align: usize);
#[rustc_allocator_nounwind]
fn __rust_realloc(ptr: *mut u8,
old_size: usize,
old_align: usize,
new_size: usize,
new_align: usize,
err: *mut u8) -> *mut u8;
#[rustc_allocator_nounwind]
fn __rust_alloc_zeroed(size: usize, align: usize, err: *mut u8) -> *mut u8;
}
#[cfg(not(stage0))]
extern "Rust" {
#[allocator]
#[rustc_allocator_nounwind]
......@@ -74,10 +52,7 @@ fn __rust_realloc(ptr: *mut u8,
unsafe impl GlobalAlloc for Global {
#[inline]
unsafe fn alloc(&self, layout: Layout) -> *mut Opaque {
#[cfg(not(stage0))]
let ptr = __rust_alloc(layout.size(), layout.align());
#[cfg(stage0)]
let ptr = __rust_alloc(layout.size(), layout.align(), &mut 0);
ptr as *mut Opaque
}
......@@ -88,20 +63,13 @@ unsafe fn dealloc(&self, ptr: *mut Opaque, layout: Layout) {
#[inline]
unsafe fn realloc(&self, ptr: *mut Opaque, layout: Layout, new_size: usize) -> *mut Opaque {
#[cfg(not(stage0))]
let ptr = __rust_realloc(ptr as *mut u8, layout.size(), layout.align(), new_size);
#[cfg(stage0)]
let ptr = __rust_realloc(ptr as *mut u8, layout.size(), layout.align(),
new_size, layout.align(), &mut 0);
ptr as *mut Opaque
}
#[inline]
unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut Opaque {
#[cfg(not(stage0))]
let ptr = __rust_alloc_zeroed(layout.size(), layout.align());
#[cfg(stage0)]
let ptr = __rust_alloc_zeroed(layout.size(), layout.align(), &mut 0);
ptr as *mut Opaque
}
}
......@@ -152,14 +120,7 @@ unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 {
}
}
#[cfg(stage0)]
#[lang = "box_free"]
#[inline]
unsafe fn old_box_free<T: ?Sized>(ptr: *mut T) {
box_free(Unique::new_unchecked(ptr))
}
#[cfg_attr(not(any(test, stage0)), lang = "box_free")]
#[cfg_attr(not(test), lang = "box_free")]
#[inline]
pub(crate) unsafe fn box_free<T: ?Sized>(ptr: Unique<T>) {
let ptr = ptr.as_ptr();
......@@ -172,12 +133,6 @@ pub(crate) unsafe fn box_free<T: ?Sized>(ptr: Unique<T>) {
}
}
#[cfg(stage0)]
pub fn oom() -> ! {
unsafe { ::core::intrinsics::abort() }
}
#[cfg(not(stage0))]
pub fn oom() -> ! {
extern {
#[lang = "oom"]
......
......@@ -75,7 +75,6 @@
#![deny(missing_debug_implementations)]
#![cfg_attr(test, allow(deprecated))] // rand
#![cfg_attr(all(not(test), stage0), feature(float_internals))]
#![cfg_attr(not(test), feature(exact_size_is_empty))]
#![cfg_attr(not(test), feature(generator_trait))]
#![cfg_attr(test, feature(rand, test))]
......@@ -90,13 +89,10 @@
#![feature(collections_range)]
#![feature(const_fn)]
#![feature(core_intrinsics)]
#![cfg_attr(stage0, feature(core_slice_ext))]
#![cfg_attr(stage0, feature(core_str_ext))]
#![feature(custom_attribute)]
#![feature(dropck_eyepatch)]
#![feature(exact_size_is_empty)]
#![feature(fmt_internals)]
#![cfg_attr(stage0, feature(fn_must_use))]
#![feature(from_ref)]
#![feature(fundamental)]
#![feature(lang_items)]
......@@ -122,7 +118,6 @@
#![feature(exact_chunks)]
#![feature(pointer_methods)]
#![feature(inclusive_range_methods)]
#![cfg_attr(stage0, feature(generic_param_attrs))]
#![feature(rustc_const_unstable)]
#![feature(const_vec_new)]
......@@ -157,15 +152,10 @@ pub mod allocator {
#[unstable(feature = "allocator_api", issue = "32838")]
#[rustc_deprecated(since = "1.27.0", reason = "module renamed to `alloc`")]
/// Use the `alloc` module instead.
#[cfg(not(stage0))]
pub mod heap {
pub use alloc::*;
}
#[unstable(feature = "allocator_api", issue = "32838")]
#[rustc_deprecated(since = "1.27.0", reason = "module renamed to `alloc`")]
#[cfg(stage0)]
pub mod heap;
// Primitive types using the heaps above
......
......@@ -101,7 +101,6 @@
use core::mem::size_of;
use core::mem;
use core::ptr;
#[cfg(stage0)] use core::slice::SliceExt;
use core::{u8, u16, u32};
use borrow::{Borrow, BorrowMut, ToOwned};
......@@ -171,13 +170,9 @@ pub fn to_vec<T>(s: &[T]) -> Vec<T>
}
}
#[cfg_attr(stage0, lang = "slice")]
#[cfg_attr(not(stage0), lang = "slice_alloc")]
#[lang = "slice_alloc"]
#[cfg(not(test))]
impl<T> [T] {
#[cfg(stage0)]
slice_core_methods!();
/// Sorts the slice.
///
/// This sort is stable (i.e. does not reorder equal elements) and `O(n log n)` worst-case.
......@@ -467,8 +462,7 @@ pub fn repeat(&self, n: usize) -> Vec<T> where T: Copy {
}
}
#[cfg_attr(stage0, lang = "slice_u8")]
#[cfg_attr(not(stage0), lang = "slice_u8_alloc")]
#[lang = "slice_u8_alloc"]
#[cfg(not(test))]
impl [u8] {
/// Returns a vector containing a copy of this slice where each byte
......@@ -504,9 +498,6 @@ pub fn to_ascii_lowercase(&self) -> Vec<u8> {
me.make_ascii_lowercase();
me
}
#[cfg(stage0)]
slice_u8_core_methods!();
}
////////////////////////////////////////////////////////////////////////////////
......
......@@ -40,7 +40,6 @@
use core::fmt;
use core::str as core_str;
#[cfg(stage0)] use core::str::StrExt;
use core::str::pattern::Pattern;
use core::str::pattern::{Searcher, ReverseSearcher, DoubleEndedSearcher};
use core::mem;
......@@ -158,13 +157,9 @@ fn clone_into(&self, target: &mut String) {
}
/// Methods for string slices.
#[cfg_attr(stage0, lang = "str")]
#[cfg_attr(not(stage0), lang = "str_alloc")]
#[lang = "str_alloc"]
#[cfg(not(test))]
impl str {
#[cfg(stage0)]
str_core_methods!();
/// Converts a `Box<str>` into a `Box<[u8]>` without copying or allocating.
///
/// # Examples
......
......@@ -73,9 +73,6 @@
use core::iter::{FromIterator, FusedIterator, TrustedLen};
use core::marker::PhantomData;
use core::mem;
#[cfg(not(test))]
#[cfg(stage0)]
use core::num::Float;
use core::ops::Bound::{Excluded, Included, Unbounded};
use core::ops::{Index, IndexMut, RangeBounds};
use core::ops;
......
......@@ -97,13 +97,6 @@ fn align_to_flags(align: usize, size: usize) -> c_int {
ptr
}
#[cfg(stage0)]
#[no_mangle]
#[rustc_std_internal_symbol]
pub unsafe extern fn __rde_oom() -> ! {
::core::intrinsics::abort();
}
#[no_mangle]
#[rustc_std_internal_symbol]
pub unsafe extern fn __rde_dealloc(ptr: *mut u8,
......
......@@ -73,33 +73,6 @@ unsafe fn realloc(&mut self,
}
}
#[cfg(stage0)]
#[unstable(feature = "allocator_api", issue = "32838")]
unsafe impl<'a> Alloc for &'a System {
#[inline]
unsafe fn alloc(&mut self, layout: Layout) -> Result<NonNull<Opaque>, AllocErr> {
NonNull::new(GlobalAlloc::alloc(*self, layout)).ok_or(AllocErr)
}
#[inline]
unsafe fn alloc_zeroed(&mut self, layout: Layout) -> Result<NonNull<Opaque>, AllocErr> {
NonNull::new(GlobalAlloc::alloc_zeroed(*self, layout)).ok_or(AllocErr)
}
#[inline]
unsafe fn dealloc(&mut self, ptr: NonNull<Opaque>, layout: Layout) {
GlobalAlloc::dealloc(*self, ptr.as_ptr(), layout)
}
#[inline]
unsafe fn realloc(&mut self,
ptr: NonNull<Opaque>,
layout: Layout,
new_size: usize) -> Result<NonNull<Opaque>, AllocErr> {
NonNull::new(GlobalAlloc::realloc(*self, ptr.as_ptr(), layout, new_size)).ok_or(AllocErr)
}
}
#[cfg(any(windows, unix, target_os = "cloudabi", target_os = "redox"))]
mod realloc_fallback {
use core::alloc::{GlobalAlloc, Opaque, Layout};
......
......@@ -26,7 +26,6 @@
#![feature(alloc)]
#![feature(core_intrinsics)]
#![feature(dropck_eyepatch)]
#![cfg_attr(stage0, feature(generic_param_attrs))]
#![cfg_attr(test, feature(test))]
#![allow(deprecated)]
......
......@@ -2,6 +2,8 @@
authors = ["The Rust Project Developers"]
name = "core"
version = "0.0.0"
autotests = false
autobenches = false
[lib]
name = "core"
......
......@@ -153,7 +153,6 @@ pub struct AssertParamIsCopy<T: Copy + ?Sized> { _field: ::marker::PhantomData<T
///
/// Implementations that cannot be described in Rust
/// are implemented in `SelectionContext::copy_clone_conditions()` in librustc.
#[cfg(not(stage0))]
mod impls {
use super::Clone;
......
......@@ -86,17 +86,3 @@ fn $method(&mut self, other: &'a $u) {
}
}
}
#[cfg(stage0)]
macro_rules! public_in_stage0 {
( { $(#[$attr:meta])* } $($Item: tt)*) => {
$(#[$attr])* pub $($Item)*
}
}
#[cfg(not(stage0))]
macro_rules! public_in_stage0 {
( { $(#[$attr:meta])* } $($Item: tt)*) => {
$(#[$attr])* pub(crate) $($Item)*
}
}
......@@ -112,18 +112,13 @@
#![feature(unwind_attributes)]
#![feature(doc_alias)]
#![feature(inclusive_range_methods)]
#![cfg_attr(not(stage0), feature(mmx_target_feature))]
#![cfg_attr(not(stage0), feature(tbm_target_feature))]
#![cfg_attr(not(stage0), feature(sse4a_target_feature))]
#![cfg_attr(not(stage0), feature(arm_target_feature))]
#![cfg_attr(not(stage0), feature(powerpc_target_feature))]
#![cfg_attr(not(stage0), feature(mips_target_feature))]
#![cfg_attr(not(stage0), feature(aarch64_target_feature))]
#![cfg_attr(stage0, feature(target_feature))]
#![cfg_attr(stage0, feature(cfg_target_feature))]
#![cfg_attr(stage0, feature(fn_must_use))]
#![feature(mmx_target_feature)]
#![feature(tbm_target_feature)]
#![feature(sse4a_target_feature)]
#![feature(arm_target_feature)]
#![feature(powerpc_target_feature)]
#![feature(mips_target_feature)]
#![feature(aarch64_target_feature)]
#[prelude_import]
#[allow(unused)]
......
......@@ -611,7 +611,6 @@ unsafe impl<'a, T: ?Sized> Freeze for &'a mut T {}
///
/// Implementations that cannot be described in Rust
/// are implemented in `SelectionContext::copy_clone_conditions()` in librustc.
#[cfg(not(stage0))]
mod copy_impls {
use super::Copy;
......
......@@ -19,7 +19,7 @@
use mem;
use num::Float;
#[cfg(not(stage0))] use num::FpCategory;
use num::FpCategory;
use num::FpCategory as Fp;
/// The radix or base of the internal representation of `f32`.
......@@ -277,7 +277,6 @@ fn from_bits(v: u32) -> Self {
// FIXME: remove (inline) this macro and the Float trait
// when updating to a bootstrap compiler that has the new lang items.
#[cfg_attr(stage0, macro_export)]
#[unstable(feature = "core_float", issue = "32110")]
macro_rules! f32_core_methods { () => {
/// Returns `true` if this value is `NaN` and false otherwise.
......@@ -553,7 +552,6 @@ pub fn from_bits(v: u32) -> Self {
#[lang = "f32"]
#[cfg(not(test))]
#[cfg(not(stage0))]
impl f32 {
f32_core_methods!();
}
......@@ -19,7 +19,7 @@
use mem;
use num::Float;
#[cfg(not(stage0))] use num::FpCategory;
use num::FpCategory;
use num::FpCategory as Fp;
/// The radix or base of the internal representation of `f64`.
......@@ -276,7 +276,6 @@ fn from_bits(v: u64) -> Self {
// FIXME: remove (inline) this macro and the Float trait
// when updating to a bootstrap compiler that has the new lang items.
#[cfg_attr(stage0, macro_export)]
#[unstable(feature = "core_float", issue = "32110")]
macro_rules! f64_core_methods { () => {
/// Returns `true` if this value is `NaN` and false otherwise.
......@@ -562,7 +561,6 @@ pub fn from_bits(v: u64) -> Self {
#[lang = "f64"]
#[cfg(not(test))]
#[cfg(not(stage0))]
impl f64 {
f64_core_methods!();
}
......@@ -422,7 +422,6 @@ pub fn swap_bytes(self) -> Self {
/// assert_eq!(m, -22016);
/// ```
#[unstable(feature = "reverse_bits", issue = "48763")]
#[cfg(not(stage0))]
#[inline]
pub fn reverse_bits(self) -> Self {
(self as $UnsignedT).reverse_bits() as Self
......@@ -2194,7 +2193,6 @@ pub fn swap_bytes(self) -> Self {
/// assert_eq!(m, 43520);
/// ```
#[unstable(feature = "reverse_bits", issue = "48763")]
#[cfg(not(stage0))]
#[inline]
pub fn reverse_bits(self) -> Self {
unsafe { intrinsics::bitreverse(self as $ActualT) as Self }
......
......@@ -335,18 +335,8 @@ pub struct RangeInclusive<Idx> {
// but it is known that LLVM is not able to optimize loops following that RFC.
// Consider adding an extra `bool` field to indicate emptiness of the range.
// See #45222 for performance test cases.
#[cfg(not(stage0))]
pub(crate) start: Idx,
#[cfg(not(stage0))]
pub(crate) end: Idx,
/// The lower bound of the range (inclusive).
#[cfg(stage0)]
#[unstable(feature = "inclusive_range_fields", issue = "49022")]
pub start: Idx,
/// The upper bound of the range (inclusive).
#[cfg(stage0)]
#[unstable(feature = "inclusive_range_fields", issue = "49022")]
pub end: Idx,
}
impl<Idx> RangeInclusive<Idx> {
......
......@@ -54,13 +54,3 @@
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use result::Result::{self, Ok, Err};
// Re-exported extension traits for primitive types
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
#[cfg(stage0)]
pub use slice::SliceExt;
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
#[cfg(stage0)]
pub use str::StrExt;
此差异已折叠。
此差异已折叠。
......@@ -41,7 +41,6 @@
#![feature(try_from)]
#![feature(try_trait)]
#![feature(exact_chunks)]
#![cfg_attr(stage0, feature(atomic_nand))]
#![feature(reverse_bits)]
#![feature(inclusive_range_methods)]
#![feature(iterator_find_map)]
......
......@@ -98,7 +98,6 @@ fn test_swap_bytes() {
}
#[test]
#[cfg(not(stage0))]
fn test_reverse_bits() {
assert_eq!(A.reverse_bits().reverse_bits(), A);
assert_eq!(B.reverse_bits().reverse_bits(), B);
......
......@@ -46,7 +46,6 @@
#![feature(core_intrinsics)]
#![feature(drain_filter)]
#![feature(entry_or_default)]
#![cfg_attr(stage0, feature(dyn_trait))]
#![feature(from_ref)]
#![feature(fs_read_write)]
#![feature(iterator_find_map)]
......
......@@ -240,11 +240,11 @@ fn dump_mir_results<'a, 'gcx, 'tcx>(
});
// Also dump the inference graph constraints as a graphviz file.
let _: io::Result<()> = do_catch! {{
let _: io::Result<()> = do catch {
let mut file =
pretty::create_dump_file(infcx.tcx, "regioncx.dot", None, "nll", &0, source)?;
regioncx.dump_graphviz(&mut file)?;
}};
};
}
fn dump_annotation<'a, 'gcx, 'tcx>(
......
......@@ -24,7 +24,6 @@
#![feature(const_fn)]
#![feature(core_intrinsics)]
#![feature(decl_macro)]
#![cfg_attr(stage0, feature(dyn_trait))]
#![feature(fs_read_write)]
#![feature(macro_vis_matcher)]
#![feature(exhaustive_patterns)]
......@@ -34,7 +33,7 @@
#![feature(crate_visibility_modifier)]
#![feature(never_type)]
#![feature(specialization)]
#![cfg_attr(stage0, feature(try_trait))]
#![feature(try_trait)]
extern crate arena;
#[macro_use]
......@@ -54,16 +53,6 @@
extern crate rustc_apfloat;
extern crate byteorder;
#[cfg(stage0)]
macro_rules! do_catch {
($t:expr) => { (|| ::std::ops::Try::from_ok($t) )() }
}
#[cfg(not(stage0))]
macro_rules! do_catch {
($t:expr) => { do catch { $t } }
}
mod diagnostics;
mod borrow_check;
......
......@@ -137,7 +137,7 @@ fn dump_matched_mir_node<'a, 'gcx, 'tcx, F>(
) where
F: FnMut(PassWhere, &mut dyn Write) -> io::Result<()>,
{
let _: io::Result<()> = do_catch! {{
let _: io::Result<()> = do catch {
let mut file = create_dump_file(tcx, "mir", pass_num, pass_name, disambiguator, source)?;
writeln!(file, "// MIR for `{}`", node_path)?;
writeln!(file, "// source = {:?}", source)?;
......@@ -150,14 +150,14 @@ fn dump_matched_mir_node<'a, 'gcx, 'tcx, F>(
extra_data(PassWhere::BeforeCFG, &mut file)?;
write_mir_fn(tcx, source, mir, &mut extra_data, &mut file)?;
extra_data(PassWhere::AfterCFG, &mut file)?;
}};
};
if tcx.sess.opts.debugging_opts.dump_mir_graphviz {
let _: io::Result<()> = do_catch! {{
let _: io::Result<()> = do catch {
let mut file =
create_dump_file(tcx, "dot", pass_num, pass_name, disambiguator, source)?;
write_mir_fn_graphviz(tcx, source.def_id, mir, &mut file)?;
}};
};
}
}
......
......@@ -71,8 +71,6 @@
#![allow(non_camel_case_types)]
#![cfg_attr(stage0, feature(dyn_trait))]
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(crate_visibility_modifier)]
......
......@@ -13,8 +13,6 @@
html_root_url = "https://doc.rust-lang.org/nightly/",
html_playground_url = "https://play.rust-lang.org/")]
#![cfg_attr(stage0, feature(dyn_trait))]
#![feature(ascii_ctype)]
#![feature(rustc_private)]
#![feature(box_patterns)]
......
......@@ -17,7 +17,6 @@
#[doc(inline)] pub use alloc_system::System;
#[doc(inline)] pub use core::alloc::*;
#[cfg(not(stage0))]
#[cfg(not(test))]
#[doc(hidden)]
#[lang = "oom"]
......@@ -43,13 +42,6 @@ pub mod __default_lib_allocator {
System.alloc(layout) as *mut u8
}
#[cfg(stage0)]
#[no_mangle]
#[rustc_std_internal_symbol]
pub unsafe extern fn __rdl_oom() -> ! {
super::oom()
}
#[no_mangle]
#[rustc_std_internal_symbol]
pub unsafe extern fn __rdl_dealloc(ptr: *mut u8,
......@@ -74,57 +66,4 @@ pub mod __default_lib_allocator {
let layout = Layout::from_size_align_unchecked(size, align);
System.alloc_zeroed(layout) as *mut u8
}
#[cfg(stage0)]
pub mod stage0 {
#[no_mangle]
#[rustc_std_internal_symbol]
pub unsafe extern fn __rdl_usable_size(_layout: *const u8,
_min: *mut usize,
_max: *mut usize) {
unimplemented!()
}
#[no_mangle]
#[rustc_std_internal_symbol]
pub unsafe extern fn __rdl_alloc_excess(_size: usize,
_align: usize,
_excess: *mut usize,
_err: *mut u8) -> *mut u8 {
unimplemented!()
}
#[no_mangle]
#[rustc_std_internal_symbol]
pub unsafe extern fn __rdl_realloc_excess(_ptr: *mut u8,
_old_size: usize,
_old_align: usize,
_new_size: usize,
_new_align: usize,
_excess: *mut usize,
_err: *mut u8) -> *mut u8 {
unimplemented!()
}
#[no_mangle]
#[rustc_std_internal_symbol]
pub unsafe extern fn __rdl_grow_in_place(_ptr: *mut u8,
_old_size: usize,
_old_align: usize,
_new_size: usize,
_new_align: usize) -> u8 {
unimplemented!()
}
#[no_mangle]
#[rustc_std_internal_symbol]
pub unsafe extern fn __rdl_shrink_in_place(_ptr: *mut u8,
_old_size: usize,
_old_align: usize,
_new_size: usize,
_new_align: usize) -> u8 {
unimplemented!()
}
}
}
......@@ -18,15 +18,9 @@
#![stable(feature = "rust1", since = "1.0.0")]
#![allow(missing_docs)]
#[cfg(not(test))]
#[cfg(stage0)]
use core::num::Float;
#[cfg(not(test))]
use intrinsics;
#[cfg(not(test))]
#[cfg(stage0)]
use num::FpCategory;
#[cfg(not(test))]
use sys::cmath;
#[stable(feature = "rust1", since = "1.0.0")]
......@@ -41,12 +35,8 @@
pub use core::f32::consts;
#[cfg(not(test))]
#[cfg_attr(stage0, lang = "f32")]
#[cfg_attr(not(stage0), lang = "f32_runtime")]
#[lang = "f32_runtime"]
impl f32 {
#[cfg(stage0)]
f32_core_methods!();
/// Returns the largest integer less than or equal to a number.
///
/// # Examples
......
......@@ -18,15 +18,9 @@
#![stable(feature = "rust1", since = "1.0.0")]
#![allow(missing_docs)]
#[cfg(not(test))]
#[cfg(stage0)]
use core::num::Float;
#[cfg(not(test))]
use intrinsics;
#[cfg(not(test))]
#[cfg(stage0)]
use num::FpCategory;
#[cfg(not(test))]
use sys::cmath;
#[stable(feature = "rust1", since = "1.0.0")]
......@@ -41,12 +35,8 @@
pub use core::f64::consts;
#[cfg(not(test))]
#[cfg_attr(stage0, lang = "f64")]
#[cfg_attr(not(stage0), lang = "f64_runtime")]
#[lang = "f64_runtime"]
impl f64 {
#[cfg(stage0)]
f64_core_methods!();
/// Returns the largest integer less than or equal to a number.
///
/// # Examples
......
......@@ -252,7 +252,6 @@
#![feature(collections_range)]
#![feature(compiler_builtins_lib)]
#![feature(const_fn)]
#![cfg_attr(stage0, feature(core_float))]
#![feature(core_intrinsics)]
#![feature(dropck_eyepatch)]
#![feature(exact_size_is_empty)]
......@@ -260,10 +259,8 @@
#![feature(fs_read_write)]
#![feature(fixed_size_array)]
#![feature(float_from_str_radix)]
#![cfg_attr(stage0, feature(float_internals))]
#![feature(fn_traits)]
#![feature(fnbox)]
#![cfg_attr(stage0, feature(generic_param_attrs))]
#![feature(hashmap_internals)]
#![feature(heap_api)]
#![feature(int_error_internals)]
......@@ -319,6 +316,7 @@
#![cfg_attr(test, feature(update_panic_count))]
#![cfg_attr(windows, feature(used))]
#![feature(doc_alias)]
#![feature(float_internals)]
#![default_lib_allocator]
......@@ -364,11 +362,6 @@
#[allow(unused_extern_crates)]
extern crate unwind;
// compiler-rt intrinsics
#[doc(masked)]
#[cfg(stage0)]
extern crate compiler_builtins;
// During testing, this crate is not actually the "real" std library, but rather
// it links to the real std library, which was compiled from this same source
// code. So any lang items std defines are conditionally excluded (or else they
......
......@@ -45,17 +45,6 @@ fn next(&self) -> State {
}
}
macro_rules! span_err_if_not_stage0 {
($cx:expr, $sp:expr, $code:ident, $text:tt) => {
#[cfg(not(stage0))] {
span_err!($cx, $sp, $code, $text)
}
#[cfg(stage0)] {
$cx.span_err($sp, $text)
}
}
}
const OPTIONS: &'static [&'static str] = &["volatile", "alignstack", "intel"];
pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt,
......@@ -100,7 +89,7 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt,
if asm_str_style.is_some() {
// If we already have a string with instructions,
// ending up in Asm state again is an error.
span_err_if_not_stage0!(cx, sp, E0660, "malformed inline assembly");
span_err!(cx, sp, E0660, "malformed inline assembly");
return DummyResult::expr(sp);
}
// Nested parser, stop before the first colon (see above).
......@@ -153,7 +142,7 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt,
Some(Symbol::intern(&format!("={}", ch.as_str())))
}
_ => {
span_err_if_not_stage0!(cx, span, E0661,
span_err!(cx, span, E0661,
"output operand constraint lacks '=' or '+'");
None
}
......@@ -179,10 +168,10 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt,
let (constraint, _str_style) = panictry!(p.parse_str());
if constraint.as_str().starts_with("=") {
span_err_if_not_stage0!(cx, p.prev_span, E0662,
span_err!(cx, p.prev_span, E0662,
"input operand constraint contains '='");
} else if constraint.as_str().starts_with("+") {
span_err_if_not_stage0!(cx, p.prev_span, E0663,
span_err!(cx, p.prev_span, E0663,
"input operand constraint contains '+'");
}
......@@ -205,7 +194,7 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt,
if OPTIONS.iter().any(|&opt| s == opt) {
cx.span_warn(p.prev_span, "expected a clobber, found an option");
} else if s.as_str().starts_with("{") || s.as_str().ends_with("}") {
span_err_if_not_stage0!(cx, p.prev_span, E0664,
span_err!(cx, p.prev_span, E0664,
"clobber should not be surrounded by braces");
}
......
......@@ -18,7 +18,7 @@
#![feature(decl_macro)]
#![feature(str_escape)]
#![cfg_attr(not(stage0), feature(rustc_diagnostic_macros))]
#![feature(rustc_diagnostic_macros)]
extern crate fmt_macros;
#[macro_use]
......@@ -29,7 +29,6 @@
extern crate rustc_errors as errors;
extern crate rustc_target;
#[cfg(not(stage0))]
mod diagnostics;
mod assert;
......
......@@ -23,7 +23,7 @@
// of other runtime components (registered via yet another special image section).
#![feature(no_core, lang_items, optin_builtin_traits)]
#![crate_type="rlib"]
#![crate_type = "rlib"]
#![no_core]
#![allow(non_camel_case_types)]
......@@ -43,7 +43,7 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
drop_in_place(to_drop);
}
#[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))]
#[cfg(all(target_os = "windows", target_arch = "x86", target_env = "gnu"))]
pub mod eh_frames {
#[no_mangle]
#[link_section = ".eh_frame"]
......@@ -54,6 +54,21 @@ pub mod eh_frames {
// This is defined as `struct object` in $GCC/libgcc/unwind-dw2-fde.h.
static mut OBJ: [isize; 6] = [0; 6];
macro_rules! impl_copy {
($($t:ty)*) => {
$(
impl ::Copy for $t {}
)*
}
}
impl_copy! {
usize u8 u16 u32 u64 u128
isize i8 i16 i32 i64 i128
f32 f64
bool char
}
// Unwind info registration/deregistration routines.
// See the docs of `unwind` module in libstd.
extern "C" {
......@@ -63,14 +78,18 @@ pub mod eh_frames {
unsafe fn init() {
// register unwind info on module startup
rust_eh_register_frames(&__EH_FRAME_BEGIN__ as *const u8,
&mut OBJ as *mut _ as *mut u8);
rust_eh_register_frames(
&__EH_FRAME_BEGIN__ as *const u8,
&mut OBJ as *mut _ as *mut u8,
);
}
unsafe fn uninit() {
// unregister on shutdown
rust_eh_unregister_frames(&__EH_FRAME_BEGIN__ as *const u8,
&mut OBJ as *mut _ as *mut u8);
rust_eh_unregister_frames(
&__EH_FRAME_BEGIN__ as *const u8,
&mut OBJ as *mut _ as *mut u8,
);
}
// MSVC-specific init/uninit routine registration
......
......@@ -4,7 +4,7 @@ name = "rustc-main"
version = "0.0.0"
[[bin]]
name = "rustc"
name = "rustc_binary"
path = "rustc.rs"
[dependencies]
......
......@@ -12,7 +12,7 @@
# 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`.
date: 2018-04-24
date: 2018-05-10
rustc: beta
cargo: beta
......
......@@ -7,7 +7,7 @@ authors = ["The Rust Project Developers"]
# the wrong rustdoc being executed. To avoid the conflicting rustdocs, we name the "tool"
# rustdoc a different name.
[[bin]]
name = "rustdoc-tool-binary"
name = "rustdoc_tool_binary"
path = "main.rs"
[dependencies]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册