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

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

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

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

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

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

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

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

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

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

Lines changed: 1 addition & 1 deletion
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
}

0 commit comments

Comments
 (0)