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

Lines changed: 2 additions & 3 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 2 additions & 3 deletions
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

Lines changed: 0 additions & 7 deletions
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

Lines changed: 0 additions & 5 deletions
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

Lines changed: 0 additions & 65 deletions
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

Lines changed: 1 addition & 2 deletions
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;

0 commit comments

Comments
 (0)