Skip to content

Commit 8c2d7b2

Browse files
committed
Auto merge of #49661 - alexcrichton:bump-bootstrap, r=nikomatsakis
Bump the bootstrap compiler to 1.26.0 beta Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language features!
2 parents 04fef17 + 8958815 commit 8c2d7b2

File tree

39 files changed

+18
-175
lines changed

39 files changed

+18
-175
lines changed

src/bootstrap/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@
114114
//! also check out the `src/bootstrap/README.md` file for more information.
115115
116116
#![deny(warnings)]
117-
#![feature(conservative_impl_trait, fs_read_write, core_intrinsics)]
118-
#![feature(slice_concat_ext)]
117+
#![feature(core_intrinsics)]
119118

120119
#[macro_use]
121120
extern crate build_helper;
@@ -1155,7 +1154,7 @@ impl Build {
11551154

11561155
fn read(&self, path: &Path) -> String {
11571156
if self.config.dry_run { return String::new(); }
1158-
t!(fs::read_string(path))
1157+
t!(fs::read_to_string(path))
11591158
}
11601159

11611160
fn create_dir(&self, dir: &Path) {

src/bootstrap/tool.rs

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use std::fs;
1212
use std::env;
1313
use std::path::PathBuf;
1414
use std::process::{Command, exit};
15-
use std::slice::SliceConcatExt;
1615

1716
use Mode;
1817
use Compiler;

src/liballoc/benches/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#![deny(warnings)]
1212

13-
#![cfg_attr(stage0, feature(i128_type))]
1413
#![feature(rand)]
1514
#![feature(repr_simd)]
1615
#![feature(slice_sort_by_cached_key)]

src/liballoc/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@
9797
#![feature(fmt_internals)]
9898
#![feature(from_ref)]
9999
#![feature(fundamental)]
100-
#![cfg_attr(stage0, feature(generic_param_attrs))]
101-
#![cfg_attr(stage0, feature(i128_type))]
102100
#![feature(lang_items)]
103101
#![feature(needs_allocator)]
104102
#![feature(nonzero)]
@@ -123,6 +121,7 @@
123121
#![feature(exact_chunks)]
124122
#![feature(pointer_methods)]
125123
#![feature(inclusive_range_fields)]
124+
#![cfg_attr(stage0, feature(generic_param_attrs))]
126125

127126
#![cfg_attr(not(test), feature(fn_traits, swap_with_slice, i128))]
128127
#![cfg_attr(test, feature(test))]

src/liballoc/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#![feature(alloc_system)]
1515
#![feature(attr_literals)]
1616
#![feature(box_syntax)]
17-
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
1817
#![feature(const_fn)]
1918
#![feature(drain_filter)]
2019
#![feature(exact_size_is_empty)]

src/libcore/cmp.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ impl<T: Ord> Ord for Reverse<T> {
427427
/// }
428428
/// }
429429
/// ```
430-
#[cfg_attr(not(stage0), lang = "ord")]
430+
#[lang = "ord"]
431431
#[stable(feature = "rust1", since = "1.0.0")]
432432
pub trait Ord: Eq + PartialOrd<Self> {
433433
/// This method returns an `Ordering` between `self` and `other`.
@@ -597,8 +597,7 @@ impl PartialOrd for Ordering {
597597
/// assert_eq!(x < y, true);
598598
/// assert_eq!(x.lt(&y), true);
599599
/// ```
600-
#[cfg_attr(stage0, lang = "ord")]
601-
#[cfg_attr(not(stage0), lang = "partial_ord")]
600+
#[lang = "partial_ord"]
602601
#[stable(feature = "rust1", since = "1.0.0")]
603602
#[rustc_on_unimplemented = "can't compare `{Self}` with `{Rhs}`"]
604603
pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {

src/libcore/intrinsics.rs

-7
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,6 @@ extern "rust-intrinsic" {
12931293
pub fn bswap<T>(x: T) -> T;
12941294

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

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

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

13221320
/// Performs an unchecked division, resulting in undefined behavior
@@ -1401,8 +1399,3 @@ extern "rust-intrinsic" {
14011399
/// Probably will never become stable.
14021400
pub fn nontemporal_store<T>(ptr: *mut T, val: T);
14031401
}
1404-
1405-
#[cfg(stage0)]
1406-
pub unsafe fn exact_div<T>(a: T, b: T) -> T {
1407-
unchecked_div(a, b)
1408-
}

src/libcore/lib.rs

-5
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@
7878
#![feature(doc_spotlight)]
7979
#![feature(fn_must_use)]
8080
#![feature(fundamental)]
81-
#![cfg_attr(stage0, feature(i128_type))]
82-
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
8381
#![feature(intrinsics)]
8482
#![feature(iterator_flatten)]
8583
#![feature(iterator_repeat_with)]
@@ -103,9 +101,6 @@
103101
#![feature(untagged_unions)]
104102
#![feature(unwind_attributes)]
105103

106-
#![cfg_attr(stage0, allow(unused_attributes))]
107-
#![cfg_attr(stage0, feature(never_type))]
108-
109104
#[prelude_import]
110105
#[allow(unused)]
111106
use prelude::v1::*;

src/libcore/macros.rs

-65
Original file line numberDiff line numberDiff line change
@@ -28,71 +28,6 @@ macro_rules! panic {
2828
});
2929
}
3030

31-
/// Ensure that a boolean expression is `true` at runtime.
32-
///
33-
/// This will invoke the [`panic!`] macro if the provided expression cannot be
34-
/// evaluated to `true` at runtime.
35-
///
36-
/// # Uses
37-
///
38-
/// Assertions are always checked in both debug and release builds, and cannot
39-
/// be disabled. See [`debug_assert!`] for assertions that are not enabled in
40-
/// release builds by default.
41-
///
42-
/// Unsafe code relies on `assert!` to enforce run-time invariants that, if
43-
/// violated could lead to unsafety.
44-
///
45-
/// Other use-cases of `assert!` include [testing] and enforcing run-time
46-
/// invariants in safe code (whose violation cannot result in unsafety).
47-
///
48-
/// # Custom Messages
49-
///
50-
/// This macro has a second form, where a custom panic message can
51-
/// be provided with or without arguments for formatting. See [`std::fmt`]
52-
/// for syntax for this form.
53-
///
54-
/// [`panic!`]: macro.panic.html
55-
/// [`debug_assert!`]: macro.debug_assert.html
56-
/// [testing]: ../book/second-edition/ch11-01-writing-tests.html#checking-results-with-the-assert-macro
57-
/// [`std::fmt`]: ../std/fmt/index.html
58-
///
59-
/// # Examples
60-
///
61-
/// ```
62-
/// // the panic message for these assertions is the stringified value of the
63-
/// // expression given.
64-
/// assert!(true);
65-
///
66-
/// fn some_computation() -> bool { true } // a very simple function
67-
///
68-
/// assert!(some_computation());
69-
///
70-
/// // assert with a custom message
71-
/// let x = true;
72-
/// assert!(x, "x wasn't true!");
73-
///
74-
/// let a = 3; let b = 27;
75-
/// assert!(a + b == 30, "a = {}, b = {}", a, b);
76-
/// ```
77-
#[macro_export]
78-
#[stable(feature = "rust1", since = "1.0.0")]
79-
#[cfg(stage0)]
80-
macro_rules! assert {
81-
($cond:expr) => (
82-
if !$cond {
83-
panic!(concat!("assertion failed: ", stringify!($cond)))
84-
}
85-
);
86-
($cond:expr,) => (
87-
assert!($cond)
88-
);
89-
($cond:expr, $($arg:tt)+) => (
90-
if !$cond {
91-
panic!($($arg)+)
92-
}
93-
);
94-
}
95-
9631
/// Asserts that two expressions are equal to each other (using [`PartialEq`]).
9732
///
9833
/// On panic, this macro will print the values of the expressions with their

src/libcore/panicking.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ pub fn panic_fmt(fmt: fmt::Arguments, file_line_col: &(&'static str, u32, u32))
6464
#[allow(improper_ctypes)]
6565
extern {
6666
#[lang = "panic_fmt"]
67-
#[cfg_attr(stage0, unwind)]
68-
#[cfg_attr(not(stage0), unwind(allowed))]
67+
#[unwind(allowed)]
6968
fn panic_impl(fmt: fmt::Arguments, file: &'static str, line: u32, col: u32) -> !;
7069
}
7170
let (file, line, col) = *file_line_col;

src/libcore/tests/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@
2323
#![feature(fmt_internals)]
2424
#![feature(hashmap_internals)]
2525
#![feature(iterator_step_by)]
26-
#![cfg_attr(stage0, feature(i128_type))]
27-
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
2826
#![feature(iterator_flatten)]
29-
#![cfg_attr(stage0, feature(conservative_impl_trait))]
3027
#![feature(iterator_repeat_with)]
3128
#![feature(nonzero)]
3229
#![feature(pattern)]

src/libpanic_unwind/gcc.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,7 @@ unsafe fn find_eh_action(context: *mut uw::_Unwind_Context)
286286
// See docs in the `unwind` module.
287287
#[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))]
288288
#[lang = "eh_unwind_resume"]
289-
#[cfg_attr(stage0, unwind)]
290-
#[cfg_attr(not(stage0), unwind(allowed))]
289+
#[unwind(allowed)]
291290
unsafe extern "C" fn rust_eh_unwind_resume(panic_ctx: *mut u8) -> ! {
292291
uw::_Unwind_Resume(panic_ctx as *mut uw::_Unwind_Exception);
293292
}

src/libpanic_unwind/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ pub unsafe extern "C" fn __rust_maybe_catch_panic(f: fn(*mut u8),
112112
// Entry point for raising an exception, just delegates to the platform-specific
113113
// implementation.
114114
#[no_mangle]
115-
#[cfg_attr(stage0, unwind)]
116-
#[cfg_attr(not(stage0), unwind(allowed))]
115+
#[unwind(allowed)]
117116
pub unsafe extern "C" fn __rust_start_panic(data: usize, vtable: usize) -> u32 {
118117
imp::panic(mem::transmute(raw::TraitObject {
119118
data: data as *mut (),

src/libpanic_unwind/seh64_gnu.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ unsafe extern "C" fn rust_eh_personality(exceptionRecord: *mut c::EXCEPTION_RECO
108108
}
109109

110110
#[lang = "eh_unwind_resume"]
111-
#[cfg_attr(stage0, unwind)]
112-
#[cfg_attr(not(stage0), unwind(allowed))]
111+
#[unwind(allowed)]
113112
unsafe extern "C" fn rust_eh_unwind_resume(panic_ctx: c::LPVOID) -> ! {
114113
let params = [panic_ctx as c::ULONG_PTR];
115114
c::RaiseException(RUST_PANIC,

src/libpanic_unwind/windows.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,18 @@ pub enum EXCEPTION_DISPOSITION {
7979
pub use self::EXCEPTION_DISPOSITION::*;
8080

8181
extern "system" {
82-
#[cfg_attr(stage0, unwind)]
83-
#[cfg_attr(not(stage0), unwind(allowed))]
82+
#[unwind(allowed)]
8483
pub fn RaiseException(dwExceptionCode: DWORD,
8584
dwExceptionFlags: DWORD,
8685
nNumberOfArguments: DWORD,
8786
lpArguments: *const ULONG_PTR);
88-
#[cfg_attr(stage0, unwind)]
89-
#[cfg_attr(not(stage0), unwind(allowed))]
87+
#[unwind(allowed)]
9088
pub fn RtlUnwindEx(TargetFrame: LPVOID,
9189
TargetIp: LPVOID,
9290
ExceptionRecord: *const EXCEPTION_RECORD,
9391
ReturnValue: LPVOID,
9492
OriginalContext: *const CONTEXT,
9593
HistoryTable: *const UNWIND_HISTORY_TABLE);
96-
#[cfg_attr(stage0, unwind)]
97-
#[cfg_attr(not(stage0), unwind(allowed))]
94+
#[unwind(allowed)]
9895
pub fn _CxxThrowException(pExceptionObject: *mut c_void, pThrowInfo: *mut u8);
9996
}

src/libproc_macro/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
test(no_crate_inject, attr(deny(warnings))),
3535
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]
3636

37-
#![cfg_attr(stage0, feature(i128_type))]
3837
#![feature(rustc_private)]
3938
#![feature(staged_api)]
4039
#![feature(lang_items)]

src/librustc/lib.rs

-7
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,14 @@
4343

4444
#![feature(box_patterns)]
4545
#![feature(box_syntax)]
46-
#![cfg_attr(stage0, feature(conservative_impl_trait))]
4746
#![feature(const_fn)]
48-
#![cfg_attr(stage0, feature(copy_closures, clone_closures))]
4947
#![feature(core_intrinsics)]
5048
#![feature(drain_filter)]
5149
#![feature(dyn_trait)]
5250
#![feature(entry_or_default)]
5351
#![feature(from_ref)]
5452
#![feature(fs_read_write)]
55-
#![cfg_attr(stage0, feature(i128_type, i128))]
56-
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
5753
#![cfg_attr(windows, feature(libc))]
58-
#![cfg_attr(stage0, feature(match_default_bindings))]
5954
#![feature(macro_lifetime_matcher)]
6055
#![feature(macro_vis_matcher)]
6156
#![feature(exhaustive_patterns)]
@@ -68,8 +63,6 @@
6863
#![feature(slice_patterns)]
6964
#![feature(specialization)]
7065
#![feature(unboxed_closures)]
71-
#![cfg_attr(stage0, feature(underscore_lifetimes))]
72-
#![cfg_attr(stage0, feature(universal_impl_trait))]
7366
#![feature(trace_macros)]
7467
#![feature(trusted_len)]
7568
#![feature(catch_expr)]

src/librustc_apfloat/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@
4646
#![deny(warnings)]
4747
#![forbid(unsafe_code)]
4848

49-
#![cfg_attr(stage0, feature(slice_patterns))]
50-
#![cfg_attr(stage0, feature(i128_type))]
51-
#![cfg_attr(stage0, feature(try_from))]
52-
5349
// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
5450
#[allow(unused_extern_crates)]
5551
extern crate rustc_cratesio_shim;

src/librustc_apfloat/tests/ieee.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![cfg_attr(stage0, feature(i128_type))]
12-
1311
#[macro_use]
1412
extern crate rustc_apfloat;
1513

src/librustc_borrowck/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#![allow(non_camel_case_types)]
1717

1818
#![feature(from_ref)]
19-
#![cfg_attr(stage0, feature(match_default_bindings))]
2019
#![feature(quote)]
2120

2221
#[macro_use] extern crate log;

src/librustc_const_math/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
html_root_url = "https://doc.rust-lang.org/nightly/")]
2020
#![deny(warnings)]
2121

22-
#![cfg_attr(stage0, feature(i128_type, i128))]
23-
2422
extern crate rustc_apfloat;
2523

2624
extern crate syntax;

src/librustc_data_structures/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,10 @@
2626
#![feature(unboxed_closures)]
2727
#![feature(fn_traits)]
2828
#![feature(unsize)]
29-
#![cfg_attr(stage0, feature(conservative_impl_trait))]
30-
#![cfg_attr(stage0, feature(i128_type, i128))]
3129
#![feature(specialization)]
3230
#![feature(optin_builtin_traits)]
33-
#![cfg_attr(stage0, feature(underscore_lifetimes))]
3431
#![feature(macro_vis_matcher)]
3532
#![feature(allow_internal_unstable)]
36-
#![cfg_attr(stage0, feature(universal_impl_trait))]
3733

3834
#![cfg_attr(unix, feature(libc))]
3935
#![cfg_attr(test, feature(test))]

src/librustc_errors/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#![allow(unused_attributes)]
1818
#![feature(range_contains)]
1919
#![cfg_attr(unix, feature(libc))]
20-
#![cfg_attr(stage0, feature(conservative_impl_trait))]
21-
#![cfg_attr(stage0, feature(i128_type))]
2220
#![feature(optin_builtin_traits)]
2321

2422
extern crate atty;

src/librustc_incremental/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
html_root_url = "https://doc.rust-lang.org/nightly/")]
1616
#![deny(warnings)]
1717

18-
#![cfg_attr(stage0, feature(conservative_impl_trait))]
1918
#![feature(fs_read_write)]
20-
#![cfg_attr(stage0, feature(i128_type))]
21-
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
2219
#![feature(specialization)]
2320

2421
extern crate graphviz;

src/librustc_lint/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@
2727
#![cfg_attr(test, feature(test))]
2828
#![feature(box_patterns)]
2929
#![feature(box_syntax)]
30-
#![cfg_attr(stage0, feature(i128_type))]
3130
#![feature(macro_vis_matcher)]
3231
#![feature(quote)]
3332
#![feature(rustc_diagnostic_macros)]
34-
#![cfg_attr(stage0, feature(never_type))]
3533

3634
#[macro_use]
3735
extern crate syntax;

0 commit comments

Comments
 (0)