Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the bootstrap compiler to 1.26.0 beta #49661

Merged
merged 1 commit into from
Apr 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@
//! also check out the `src/bootstrap/README.md` file for more information.

#![deny(warnings)]
#![feature(conservative_impl_trait, fs_read_write, core_intrinsics)]
#![feature(slice_concat_ext)]
#![feature(core_intrinsics)]

#[macro_use]
extern crate build_helper;
Expand Down Expand Up @@ -1149,7 +1148,7 @@ impl Build {

fn read(&self, path: &Path) -> String {
if self.config.dry_run { return String::new(); }
t!(fs::read_string(path))
t!(fs::read_to_string(path))
}

fn create_dir(&self, dir: &Path) {
Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use std::fs;
use std::env;
use std::path::PathBuf;
use std::process::{Command, exit};
use std::slice::SliceConcatExt;

use Mode;
use Compiler;
Expand Down
1 change: 0 additions & 1 deletion src/liballoc/benches/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#![deny(warnings)]

#![cfg_attr(stage0, feature(i128_type))]
#![feature(rand)]
#![feature(repr_simd)]
#![feature(slice_sort_by_cached_key)]
Expand Down
3 changes: 1 addition & 2 deletions src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@
#![feature(fmt_internals)]
#![feature(from_ref)]
#![feature(fundamental)]
#![cfg_attr(stage0, feature(generic_param_attrs))]
#![cfg_attr(stage0, feature(i128_type))]
#![feature(lang_items)]
#![feature(needs_allocator)]
#![feature(nonzero)]
Expand All @@ -123,6 +121,7 @@
#![feature(exact_chunks)]
#![feature(pointer_methods)]
#![feature(inclusive_range_fields)]
#![cfg_attr(stage0, feature(generic_param_attrs))]

#![cfg_attr(not(test), feature(fn_traits, swap_with_slice, i128))]
#![cfg_attr(test, feature(test))]
Expand Down
1 change: 0 additions & 1 deletion src/liballoc/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#![feature(alloc_system)]
#![feature(attr_literals)]
#![feature(box_syntax)]
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
#![feature(const_fn)]
#![feature(drain_filter)]
#![feature(exact_size_is_empty)]
Expand Down
5 changes: 2 additions & 3 deletions src/libcore/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ impl<T: Ord> Ord for Reverse<T> {
/// }
/// }
/// ```
#[cfg_attr(not(stage0), lang = "ord")]
#[lang = "ord"]
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Ord: Eq + PartialOrd<Self> {
/// This method returns an `Ordering` between `self` and `other`.
Expand Down Expand Up @@ -597,8 +597,7 @@ impl PartialOrd for Ordering {
/// assert_eq!(x < y, true);
/// assert_eq!(x.lt(&y), true);
/// ```
#[cfg_attr(stage0, lang = "ord")]
#[cfg_attr(not(stage0), lang = "partial_ord")]
#[lang = "partial_ord"]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_on_unimplemented = "can't compare `{Self}` with `{Rhs}`"]
pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
Expand Down
7 changes: 0 additions & 7 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,6 @@ extern "rust-intrinsic" {
pub fn bswap<T>(x: T) -> T;

/// Reverses the bits in an integer type `T`.
#[cfg(not(stage0))]
pub fn bitreverse<T>(x: T) -> T;

/// Performs checked integer addition.
Expand All @@ -1316,7 +1315,6 @@ extern "rust-intrinsic" {

/// Performs an exact division, resulting in undefined behavior where
/// `x % y != 0` or `y == 0` or `x == T::min_value() && y == -1`
#[cfg(not(stage0))]
pub fn exact_div<T>(x: T, y: T) -> T;

/// Performs an unchecked division, resulting in undefined behavior
Expand Down Expand Up @@ -1401,8 +1399,3 @@ extern "rust-intrinsic" {
/// Probably will never become stable.
pub fn nontemporal_store<T>(ptr: *mut T, val: T);
}

#[cfg(stage0)]
pub unsafe fn exact_div<T>(a: T, b: T) -> T {
unchecked_div(a, b)
}
5 changes: 0 additions & 5 deletions src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@
#![feature(doc_spotlight)]
#![feature(fn_must_use)]
#![feature(fundamental)]
#![cfg_attr(stage0, feature(i128_type))]
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
#![feature(intrinsics)]
#![feature(iterator_flatten)]
#![feature(iterator_repeat_with)]
Expand All @@ -103,9 +101,6 @@
#![feature(untagged_unions)]
#![feature(unwind_attributes)]

#![cfg_attr(stage0, allow(unused_attributes))]
#![cfg_attr(stage0, feature(never_type))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given #49593, do we still want this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps not yeah, but we can always add this back if the never type gets destabilized


#[prelude_import]
#[allow(unused)]
use prelude::v1::*;
Expand Down
65 changes: 0 additions & 65 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,71 +28,6 @@ macro_rules! panic {
});
}

/// Ensure that a boolean expression is `true` at runtime.
///
/// This will invoke the [`panic!`] macro if the provided expression cannot be
/// evaluated to `true` at runtime.
///
/// # Uses
///
/// Assertions are always checked in both debug and release builds, and cannot
/// be disabled. See [`debug_assert!`] for assertions that are not enabled in
/// release builds by default.
///
/// Unsafe code relies on `assert!` to enforce run-time invariants that, if
/// violated could lead to unsafety.
///
/// Other use-cases of `assert!` include [testing] and enforcing run-time
/// invariants in safe code (whose violation cannot result in unsafety).
///
/// # Custom Messages
///
/// This macro has a second form, where a custom panic message can
/// be provided with or without arguments for formatting. See [`std::fmt`]
/// for syntax for this form.
///
/// [`panic!`]: macro.panic.html
/// [`debug_assert!`]: macro.debug_assert.html
/// [testing]: ../book/second-edition/ch11-01-writing-tests.html#checking-results-with-the-assert-macro
/// [`std::fmt`]: ../std/fmt/index.html
///
/// # Examples
///
/// ```
/// // the panic message for these assertions is the stringified value of the
/// // expression given.
/// assert!(true);
///
/// fn some_computation() -> bool { true } // a very simple function
///
/// assert!(some_computation());
///
/// // assert with a custom message
/// let x = true;
/// assert!(x, "x wasn't true!");
///
/// let a = 3; let b = 27;
/// assert!(a + b == 30, "a = {}, b = {}", a, b);
/// ```
#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
macro_rules! assert {
($cond:expr) => (
if !$cond {
panic!(concat!("assertion failed: ", stringify!($cond)))
}
);
($cond:expr,) => (
assert!($cond)
);
($cond:expr, $($arg:tt)+) => (
if !$cond {
panic!($($arg)+)
}
);
}

/// Asserts that two expressions are equal to each other (using [`PartialEq`]).
///
/// On panic, this macro will print the values of the expressions with their
Expand Down
3 changes: 1 addition & 2 deletions src/libcore/panicking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ pub fn panic_fmt(fmt: fmt::Arguments, file_line_col: &(&'static str, u32, u32))
#[allow(improper_ctypes)]
extern {
#[lang = "panic_fmt"]
#[cfg_attr(stage0, unwind)]
#[cfg_attr(not(stage0), unwind(allowed))]
#[unwind(allowed)]
fn panic_impl(fmt: fmt::Arguments, file: &'static str, line: u32, col: u32) -> !;
}
let (file, line, col) = *file_line_col;
Expand Down
3 changes: 0 additions & 3 deletions src/libcore/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
#![feature(fmt_internals)]
#![feature(hashmap_internals)]
#![feature(iterator_step_by)]
#![cfg_attr(stage0, feature(i128_type))]
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
#![feature(iterator_flatten)]
#![cfg_attr(stage0, feature(conservative_impl_trait))]
#![feature(iterator_repeat_with)]
#![feature(nonzero)]
#![feature(pattern)]
Expand Down
3 changes: 1 addition & 2 deletions src/libpanic_unwind/gcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@ unsafe fn find_eh_action(context: *mut uw::_Unwind_Context)
// See docs in the `unwind` module.
#[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))]
#[lang = "eh_unwind_resume"]
#[cfg_attr(stage0, unwind)]
#[cfg_attr(not(stage0), unwind(allowed))]
#[unwind(allowed)]
unsafe extern "C" fn rust_eh_unwind_resume(panic_ctx: *mut u8) -> ! {
uw::_Unwind_Resume(panic_ctx as *mut uw::_Unwind_Exception);
}
Expand Down
3 changes: 1 addition & 2 deletions src/libpanic_unwind/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ pub unsafe extern "C" fn __rust_maybe_catch_panic(f: fn(*mut u8),
// Entry point for raising an exception, just delegates to the platform-specific
// implementation.
#[no_mangle]
#[cfg_attr(stage0, unwind)]
#[cfg_attr(not(stage0), unwind(allowed))]
#[unwind(allowed)]
pub unsafe extern "C" fn __rust_start_panic(data: usize, vtable: usize) -> u32 {
imp::panic(mem::transmute(raw::TraitObject {
data: data as *mut (),
Expand Down
3 changes: 1 addition & 2 deletions src/libpanic_unwind/seh64_gnu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ unsafe extern "C" fn rust_eh_personality(exceptionRecord: *mut c::EXCEPTION_RECO
}

#[lang = "eh_unwind_resume"]
#[cfg_attr(stage0, unwind)]
#[cfg_attr(not(stage0), unwind(allowed))]
#[unwind(allowed)]
unsafe extern "C" fn rust_eh_unwind_resume(panic_ctx: c::LPVOID) -> ! {
let params = [panic_ctx as c::ULONG_PTR];
c::RaiseException(RUST_PANIC,
Expand Down
9 changes: 3 additions & 6 deletions src/libpanic_unwind/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,18 @@ pub enum EXCEPTION_DISPOSITION {
pub use self::EXCEPTION_DISPOSITION::*;

extern "system" {
#[cfg_attr(stage0, unwind)]
#[cfg_attr(not(stage0), unwind(allowed))]
#[unwind(allowed)]
pub fn RaiseException(dwExceptionCode: DWORD,
dwExceptionFlags: DWORD,
nNumberOfArguments: DWORD,
lpArguments: *const ULONG_PTR);
#[cfg_attr(stage0, unwind)]
#[cfg_attr(not(stage0), unwind(allowed))]
#[unwind(allowed)]
pub fn RtlUnwindEx(TargetFrame: LPVOID,
TargetIp: LPVOID,
ExceptionRecord: *const EXCEPTION_RECORD,
ReturnValue: LPVOID,
OriginalContext: *const CONTEXT,
HistoryTable: *const UNWIND_HISTORY_TABLE);
#[cfg_attr(stage0, unwind)]
#[cfg_attr(not(stage0), unwind(allowed))]
#[unwind(allowed)]
pub fn _CxxThrowException(pExceptionObject: *mut c_void, pThrowInfo: *mut u8);
}
1 change: 0 additions & 1 deletion src/libproc_macro/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
test(no_crate_inject, attr(deny(warnings))),
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]

#![cfg_attr(stage0, feature(i128_type))]
#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(lang_items)]
Expand Down
7 changes: 0 additions & 7 deletions src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,14 @@

#![feature(box_patterns)]
#![feature(box_syntax)]
#![cfg_attr(stage0, feature(conservative_impl_trait))]
#![feature(const_fn)]
#![cfg_attr(stage0, feature(copy_closures, clone_closures))]
#![feature(core_intrinsics)]
#![feature(drain_filter)]
#![feature(dyn_trait)]
#![feature(entry_or_default)]
#![feature(from_ref)]
#![feature(fs_read_write)]
#![cfg_attr(stage0, feature(i128_type, i128))]
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
#![cfg_attr(windows, feature(libc))]
#![cfg_attr(stage0, feature(match_default_bindings))]
#![feature(macro_lifetime_matcher)]
#![feature(macro_vis_matcher)]
#![feature(exhaustive_patterns)]
Expand All @@ -68,8 +63,6 @@
#![feature(slice_patterns)]
#![feature(specialization)]
#![feature(unboxed_closures)]
#![cfg_attr(stage0, feature(underscore_lifetimes))]
#![cfg_attr(stage0, feature(universal_impl_trait))]
#![feature(trace_macros)]
#![feature(trusted_len)]
#![feature(catch_expr)]
Expand Down
4 changes: 0 additions & 4 deletions src/librustc_apfloat/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
#![deny(warnings)]
#![forbid(unsafe_code)]

#![cfg_attr(stage0, feature(slice_patterns))]
#![cfg_attr(stage0, feature(i128_type))]
#![cfg_attr(stage0, feature(try_from))]

// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
#[allow(unused_extern_crates)]
extern crate rustc_cratesio_shim;
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_apfloat/tests/ieee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(stage0, feature(i128_type))]

#[macro_use]
extern crate rustc_apfloat;

Expand Down
1 change: 0 additions & 1 deletion src/librustc_borrowck/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#![allow(non_camel_case_types)]

#![feature(from_ref)]
#![cfg_attr(stage0, feature(match_default_bindings))]
#![feature(quote)]

#[macro_use] extern crate log;
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_const_math/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![deny(warnings)]

#![cfg_attr(stage0, feature(i128_type, i128))]

extern crate rustc_apfloat;

extern crate syntax;
Expand Down
4 changes: 0 additions & 4 deletions src/librustc_data_structures/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,10 @@
#![feature(unboxed_closures)]
#![feature(fn_traits)]
#![feature(unsize)]
#![cfg_attr(stage0, feature(conservative_impl_trait))]
#![cfg_attr(stage0, feature(i128_type, i128))]
#![feature(specialization)]
#![feature(optin_builtin_traits)]
#![cfg_attr(stage0, feature(underscore_lifetimes))]
#![feature(macro_vis_matcher)]
#![feature(allow_internal_unstable)]
#![cfg_attr(stage0, feature(universal_impl_trait))]

#![cfg_attr(unix, feature(libc))]
#![cfg_attr(test, feature(test))]
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_errors/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#![allow(unused_attributes)]
#![feature(range_contains)]
#![cfg_attr(unix, feature(libc))]
#![cfg_attr(stage0, feature(conservative_impl_trait))]
#![cfg_attr(stage0, feature(i128_type))]
#![feature(optin_builtin_traits)]

extern crate atty;
Expand Down
3 changes: 0 additions & 3 deletions src/librustc_incremental/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![deny(warnings)]

#![cfg_attr(stage0, feature(conservative_impl_trait))]
#![feature(fs_read_write)]
#![cfg_attr(stage0, feature(i128_type))]
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
#![feature(specialization)]

extern crate graphviz;
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_lint/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@
#![cfg_attr(test, feature(test))]
#![feature(box_patterns)]
#![feature(box_syntax)]
#![cfg_attr(stage0, feature(i128_type))]
#![feature(macro_vis_matcher)]
#![feature(quote)]
#![feature(rustc_diagnostic_macros)]
#![cfg_attr(stage0, feature(never_type))]

#[macro_use]
extern crate syntax;
Expand Down
Loading