Skip to content

Commit 8a7dded

Browse files
Switch master to 1.38
1 parent b43eb42 commit 8a7dded

File tree

16 files changed

+17
-98
lines changed

16 files changed

+17
-98
lines changed

src/bootstrap/channel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use build_helper::output;
1313
use crate::Build;
1414

1515
// The version number
16-
pub const CFG_RELEASE_NUM: &str = "1.37.0";
16+
pub const CFG_RELEASE_NUM: &str = "1.38.0";
1717

1818
pub struct GitInfo {
1919
inner: Option<Info>,

src/liballoc/alloc.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ extern "Rust" {
1515
// them from the `#[global_allocator]` attribute if there is one, or uses the
1616
// default implementations in libstd (`__rdl_alloc` etc in `src/libstd/alloc.rs`)
1717
// otherwise.
18-
#[cfg_attr(bootstrap, allocator)]
19-
#[cfg_attr(not(bootstrap), rustc_allocator)]
18+
#[rustc_allocator]
2019
#[rustc_allocator_nounwind]
2120
fn __rust_alloc(size: usize, align: usize) -> *mut u8;
2221
#[rustc_allocator_nounwind]

src/liballoc/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
#![feature(coerce_unsized)]
8080
#![feature(dispatch_from_dyn)]
8181
#![feature(core_intrinsics)]
82-
#![cfg_attr(bootstrap, feature(custom_attribute))]
8382
#![feature(dropck_eyepatch)]
8483
#![feature(exact_size_is_empty)]
8584
#![feature(fmt_internals)]

src/libcore/ffi.rs

-6
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ impl<T> sealed_trait::VaArgSafe for *const T {}
302302
reason = "the `c_variadic` feature has not been properly tested on \
303303
all supported platforms",
304304
issue = "44930")]
305-
#[cfg(not(bootstrap))]
306305
impl<'f> VaListImpl<'f> {
307306
/// Advance to the next arg.
308307
#[inline]
@@ -324,7 +323,6 @@ impl<'f> VaListImpl<'f> {
324323
reason = "the `c_variadic` feature has not been properly tested on \
325324
all supported platforms",
326325
issue = "44930")]
327-
#[cfg(not(bootstrap))]
328326
impl<'f> Clone for VaListImpl<'f> {
329327
#[inline]
330328
fn clone(&self) -> Self {
@@ -340,7 +338,6 @@ impl<'f> Clone for VaListImpl<'f> {
340338
reason = "the `c_variadic` feature has not been properly tested on \
341339
all supported platforms",
342340
issue = "44930")]
343-
#[cfg(not(bootstrap))]
344341
impl<'f> Drop for VaListImpl<'f> {
345342
fn drop(&mut self) {
346343
// FIXME: this should call `va_end`, but there's no clean way to
@@ -359,15 +356,12 @@ impl<'f> Drop for VaListImpl<'f> {
359356
extern "rust-intrinsic" {
360357
/// Destroy the arglist `ap` after initialization with `va_start` or
361358
/// `va_copy`.
362-
#[cfg(not(bootstrap))]
363359
fn va_end(ap: &mut VaListImpl<'_>);
364360

365361
/// Copies the current location of arglist `src` to the arglist `dst`.
366-
#[cfg(not(bootstrap))]
367362
fn va_copy<'f>(dest: *mut VaListImpl<'f>, src: &VaListImpl<'f>);
368363

369364
/// Loads an argument of type `T` from the `va_list` `ap` and increment the
370365
/// argument `ap` points to.
371-
#[cfg(not(bootstrap))]
372366
fn va_arg<T: sealed_trait::VaArgSafe>(ap: &mut VaListImpl<'_>) -> T;
373367
}

src/libcore/future/future.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use crate::task::{Context, Poll};
2525
#[doc(spotlight)]
2626
#[must_use = "futures do nothing unless you `.await` or poll them"]
2727
#[stable(feature = "futures_api", since = "1.36.0")]
28-
#[cfg_attr(not(bootstrap), lang = "future_trait")]
28+
#[lang = "future_trait"]
2929
pub trait Future {
3030
/// The type of value produced on completion.
3131
#[stable(feature = "futures_api", since = "1.36.0")]

src/libcore/intrinsics.rs

-57
Original file line numberDiff line numberDiff line change
@@ -1052,16 +1052,12 @@ extern "rust-intrinsic" {
10521052
pub fn fabsf64(x: f64) -> f64;
10531053

10541054
/// Returns the minimum of two `f32` values.
1055-
#[cfg(not(bootstrap))]
10561055
pub fn minnumf32(x: f32, y: f32) -> f32;
10571056
/// Returns the minimum of two `f64` values.
1058-
#[cfg(not(bootstrap))]
10591057
pub fn minnumf64(x: f64, y: f64) -> f64;
10601058
/// Returns the maximum of two `f32` values.
1061-
#[cfg(not(bootstrap))]
10621059
pub fn maxnumf32(x: f32, y: f32) -> f32;
10631060
/// Returns the maximum of two `f64` values.
1064-
#[cfg(not(bootstrap))]
10651061
pub fn maxnumf64(x: f64, y: f64) -> f64;
10661062

10671063
/// Copies the sign from `y` to `x` for `f32` values.
@@ -1255,17 +1251,14 @@ extern "rust-intrinsic" {
12551251

12561252
/// Returns the result of an unchecked addition, resulting in
12571253
/// undefined behavior when `x + y > T::max_value()` or `x + y < T::min_value()`.
1258-
#[cfg(not(bootstrap))]
12591254
pub fn unchecked_add<T>(x: T, y: T) -> T;
12601255

12611256
/// Returns the result of an unchecked substraction, resulting in
12621257
/// undefined behavior when `x - y > T::max_value()` or `x - y < T::min_value()`.
1263-
#[cfg(not(bootstrap))]
12641258
pub fn unchecked_sub<T>(x: T, y: T) -> T;
12651259

12661260
/// Returns the result of an unchecked multiplication, resulting in
12671261
/// undefined behavior when `x * y > T::max_value()` or `x * y < T::min_value()`.
1268-
#[cfg(not(bootstrap))]
12691262
pub fn unchecked_mul<T>(x: T, y: T) -> T;
12701263

12711264
/// Performs rotate left.
@@ -1563,53 +1556,3 @@ pub unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
15631556
}
15641557
write_bytes(dst, val, count)
15651558
}
1566-
1567-
// Simple bootstrap implementations of minnum/maxnum for stage0 compilation.
1568-
1569-
/// Returns the minimum of two `f32` values.
1570-
#[cfg(bootstrap)]
1571-
pub fn minnumf32(x: f32, y: f32) -> f32 {
1572-
// IEEE754 says: minNum(x, y) is the canonicalized number x if x < y, y if y < x, the
1573-
// canonicalized number if one operand is a number and the other a quiet NaN. Otherwise it
1574-
// is either x or y, canonicalized (this means results might differ among implementations).
1575-
// When either x or y is a signaling NaN, then the result is according to 6.2.
1576-
//
1577-
// Since we do not support sNaN in Rust yet, we do not need to handle them.
1578-
// FIXME(nagisa): due to https://bugs.llvm.org/show_bug.cgi?id=33303 we canonicalize by
1579-
// multiplying by 1.0. Should switch to the `canonicalize` when it works.
1580-
(if x < y || y != y { x } else { y }) * 1.0
1581-
}
1582-
1583-
/// Returns the minimum of two `f64` values.
1584-
#[cfg(bootstrap)]
1585-
pub fn minnumf64(x: f64, y: f64) -> f64 {
1586-
// Identical to the `f32` case.
1587-
(if x < y || y != y { x } else { y }) * 1.0
1588-
}
1589-
1590-
/// Returns the maximum of two `f32` values.
1591-
#[cfg(bootstrap)]
1592-
pub fn maxnumf32(x: f32, y: f32) -> f32 {
1593-
// IEEE754 says: maxNum(x, y) is the canonicalized number y if x < y, x if y < x, the
1594-
// canonicalized number if one operand is a number and the other a quiet NaN. Otherwise it
1595-
// is either x or y, canonicalized (this means results might differ among implementations).
1596-
// When either x or y is a signaling NaN, then the result is according to 6.2.
1597-
//
1598-
// Since we do not support sNaN in Rust yet, we do not need to handle them.
1599-
// FIXME(nagisa): due to https://bugs.llvm.org/show_bug.cgi?id=33303 we canonicalize by
1600-
// multiplying by 1.0. Should switch to the `canonicalize` when it works.
1601-
(if x < y || x != x { y } else { x }) * 1.0
1602-
}
1603-
1604-
/// Returns the maximum of two `f64` values.
1605-
#[cfg(bootstrap)]
1606-
pub fn maxnumf64(x: f64, y: f64) -> f64 {
1607-
// Identical to the `f32` case.
1608-
(if x < y || x != x { y } else { x }) * 1.0
1609-
}
1610-
1611-
/// For bootstrapping, implement unchecked_sub as just wrapping_sub.
1612-
#[cfg(bootstrap)]
1613-
pub unsafe fn unchecked_sub<T>(x: T, y: T) -> T {
1614-
sub_with_overflow(x, y).0
1615-
}

src/libcore/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
#![feature(staged_api)]
100100
#![feature(std_internals)]
101101
#![feature(stmt_expr_attributes)]
102-
#![cfg_attr(not(bootstrap), feature(transparent_unions))]
102+
#![feature(transparent_unions)]
103103
#![feature(unboxed_closures)]
104104
#![feature(unsized_locals)]
105105
#![feature(untagged_unions)]

src/libcore/mem/maybe_uninit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ use crate::mem::ManuallyDrop;
207207
#[allow(missing_debug_implementations)]
208208
#[stable(feature = "maybe_uninit", since = "1.36.0")]
209209
#[derive(Copy)]
210-
#[cfg_attr(not(bootstrap), repr(transparent))]
210+
#[repr(transparent)]
211211
pub union MaybeUninit<T> {
212212
uninit: (),
213213
value: ManuallyDrop<T>,

src/libcore/num/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ assert_eq!(size_of::<Option<core::num::", stringify!($Ty), ">>(), size_of::<", s
5050
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5151
#[repr(transparent)]
5252
#[rustc_layout_scalar_valid_range_start(1)]
53-
#[cfg_attr(not(bootstrap), rustc_nonnull_optimization_guaranteed)]
53+
#[rustc_nonnull_optimization_guaranteed]
5454
pub struct $Ty($Int);
5555
}
5656

src/libcore/ptr/non_null.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use crate::cmp::Ordering;
3838
#[stable(feature = "nonnull", since = "1.25.0")]
3939
#[repr(transparent)]
4040
#[rustc_layout_scalar_valid_range_start(1)]
41-
#[cfg_attr(not(bootstrap), rustc_nonnull_optimization_guaranteed)]
41+
#[rustc_nonnull_optimization_guaranteed]
4242
pub struct NonNull<T: ?Sized> {
4343
pointer: *const T,
4444
}

src/librustc_data_structures/macros.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/// A simple static assertion macro.
22
#[macro_export]
3-
#[cfg_attr(bootstrap, allow_internal_unstable(type_ascription, underscore_const_names))]
4-
#[cfg_attr(not(bootstrap), allow_internal_unstable(type_ascription))]
3+
#[allow_internal_unstable(type_ascription)]
54
macro_rules! static_assert {
65
($test:expr) => {
76
// Use the bool to access an array such that if the bool is false, the access
@@ -13,7 +12,6 @@ macro_rules! static_assert {
1312

1413
/// Type size assertion. The first argument is a type and the second argument is its expected size.
1514
#[macro_export]
16-
#[cfg_attr(bootstrap, allow_internal_unstable(underscore_const_names))]
1715
macro_rules! static_assert_size {
1816
($ty:ty, $size:expr) => {
1917
const _: [(); $size] = [(); ::std::mem::size_of::<$ty>()];

src/librustc_resolve/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#![feature(mem_take)]
88
#![feature(nll)]
99
#![feature(rustc_diagnostic_macros)]
10-
#![cfg_attr(bootstrap, feature(type_alias_enum_variants))]
1110

1211
#![recursion_limit="256"]
1312

src/libsyntax/tokenstream.rs

-11
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,6 @@ where
5959
TokenStream: Send + Sync,
6060
{}
6161

62-
// These are safe since we ensure that they hold for all fields in the `_dummy` function.
63-
//
64-
// These impls are only here because the compiler takes forever to compute the Send and Sync
65-
// bounds without them.
66-
// FIXME: Remove these impls when the compiler can compute the bounds quickly again.
67-
// See https://github.com/rust-lang/rust/issues/60846
68-
#[cfg(all(bootstrap, parallel_compiler))]
69-
unsafe impl Send for TokenTree {}
70-
#[cfg(all(bootstrap, parallel_compiler))]
71-
unsafe impl Sync for TokenTree {}
72-
7362
impl TokenTree {
7463
/// Use this token tree as a matcher to parse given tts.
7564
pub fn parse(cx: &base::ExtCtxt<'_>, mtch: &[quoted::TokenTree], tts: TokenStream)

src/libunwind/build.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ fn main() {
44
println!("cargo:rerun-if-changed=build.rs");
55
let target = env::var("TARGET").expect("TARGET was not set");
66

7-
// FIXME: the not(bootstrap) part is needed because of the issue addressed by #62286,
8-
// and could be removed once that change is in beta.
9-
if cfg!(all(not(bootstrap), feature = "llvm-libunwind")) &&
7+
if cfg!(feature = "llvm-libunwind") &&
108
(target.contains("linux") ||
119
target.contains("fuchsia")) {
1210
// Build the unwinding from libunwind C/C++ source code.
13-
#[cfg(all(not(bootstrap), feature = "llvm-libunwind"))]
11+
#[cfg(feature = "llvm-libunwind")]
1412
llvm_libunwind::compile();
1513
} else if target.contains("linux") {
1614
if target.contains("musl") {
@@ -44,7 +42,7 @@ fn main() {
4442
}
4543
}
4644

47-
#[cfg(all(not(bootstrap), feature = "llvm-libunwind"))]
45+
#[cfg(feature = "llvm-libunwind")]
4846
mod llvm_libunwind {
4947
use std::env;
5048
use std::path::Path;

src/libunwind/libunwind.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub enum _Unwind_Context {}
6767

6868
pub type _Unwind_Exception_Cleanup_Fn = extern "C" fn(unwind_code: _Unwind_Reason_Code,
6969
exception: *mut _Unwind_Exception);
70-
#[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"),
70+
#[cfg_attr(feature = "llvm-libunwind",
7171
link(name = "unwind", kind = "static"))]
7272
extern "C" {
7373
#[unwind(allowed)]
@@ -93,7 +93,7 @@ if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm
9393
}
9494
pub use _Unwind_Action::*;
9595

96-
#[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"),
96+
#[cfg_attr(feature = "llvm-libunwind",
9797
link(name = "unwind", kind = "static"))]
9898
extern "C" {
9999
pub fn _Unwind_GetGR(ctx: *mut _Unwind_Context, reg_index: c_int) -> _Unwind_Word;
@@ -148,7 +148,7 @@ if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm
148148
pub const UNWIND_POINTER_REG: c_int = 12;
149149
pub const UNWIND_IP_REG: c_int = 15;
150150

151-
#[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"),
151+
#[cfg_attr(feature = "llvm-libunwind",
152152
link(name = "unwind", kind = "static"))]
153153
extern "C" {
154154
fn _Unwind_VRS_Get(ctx: *mut _Unwind_Context,
@@ -212,7 +212,7 @@ if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm
212212
cfg_if::cfg_if! {
213213
if #[cfg(not(all(target_os = "ios", target_arch = "arm")))] {
214214
// Not 32-bit iOS
215-
#[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"),
215+
#[cfg_attr(feature = "llvm-libunwind",
216216
link(name = "unwind", kind = "static"))]
217217
extern "C" {
218218
#[unwind(allowed)]
@@ -223,7 +223,7 @@ if #[cfg(not(all(target_os = "ios", target_arch = "arm")))] {
223223
}
224224
} else {
225225
// 32-bit iOS uses SjLj and does not provide _Unwind_Backtrace()
226-
#[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"),
226+
#[cfg_attr(feature = "llvm-libunwind",
227227
link(name = "unwind", kind = "static"))]
228228
extern "C" {
229229
#[unwind(allowed)]

src/stage0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# source tarball for a stable release you'll likely see `1.x.0` for rustc and
1313
# `0.x.0` for Cargo where they were released on `date`.
1414

15-
date: 2019-05-23
15+
date: 2019-07-04
1616
rustc: beta
1717
cargo: beta
1818

0 commit comments

Comments
 (0)