Skip to content

Commit ba43811

Browse files
committed
Auto merge of #58793 - Mark-Simulacrum:master-next, r=alexcrichton
Bootstrap compiler update for 1.35 release r? @alexcrichton
2 parents 7dbba3d + 0467943 commit ba43811

File tree

13 files changed

+26
-152
lines changed

13 files changed

+26
-152
lines changed

src/bootstrap/channel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::Build;
1414
use crate::config::Config;
1515

1616
// The version number
17-
pub const CFG_RELEASE_NUM: &str = "1.34.0";
17+
pub const CFG_RELEASE_NUM: &str = "1.35.0";
1818

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

src/liballoc/macros.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
#[cfg(not(test))]
3535
#[macro_export]
3636
#[stable(feature = "rust1", since = "1.0.0")]
37-
#[cfg_attr(not(stage0), allow_internal_unstable(box_syntax))]
38-
#[cfg_attr(stage0, allow_internal_unstable)]
37+
#[allow_internal_unstable(box_syntax)]
3938
macro_rules! vec {
4039
($elem:expr; $n:expr) => (
4140
$crate::vec::from_elem($elem, $n)

src/libcore/intrinsics.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1282,13 +1282,11 @@ extern "rust-intrinsic" {
12821282
/// The stabilized versions of this intrinsic are available on the integer
12831283
/// primitives via the `saturating_add` method. For example,
12841284
/// [`std::u32::saturating_add`](../../std/primitive.u32.html#method.saturating_add)
1285-
#[cfg(not(stage0))]
12861285
pub fn saturating_add<T>(a: T, b: T) -> T;
12871286
/// Computes `a - b`, while saturating at numeric bounds.
12881287
/// The stabilized versions of this intrinsic are available on the integer
12891288
/// primitives via the `saturating_sub` method. For example,
12901289
/// [`std::u32::saturating_sub`](../../std/primitive.u32.html#method.saturating_sub)
1291-
#[cfg(not(stage0))]
12921290
pub fn saturating_sub<T>(a: T, b: T) -> T;
12931291

12941292
/// Returns the value of the discriminant for the variant in 'v',

src/libcore/macros.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/// Entry point of thread panic. For details, see `std::macros`.
22
#[macro_export]
3-
#[cfg_attr(not(stage0), allow_internal_unstable(core_panic, __rust_unstable_column))]
4-
#[cfg_attr(stage0, allow_internal_unstable)]
3+
#[allow_internal_unstable(core_panic, __rust_unstable_column)]
54
#[stable(feature = "core", since = "1.6.0")]
65
macro_rules! panic {
76
() => (
@@ -422,8 +421,7 @@ macro_rules! write {
422421
/// ```
423422
#[macro_export]
424423
#[stable(feature = "rust1", since = "1.0.0")]
425-
#[cfg_attr(stage0, allow_internal_unstable)]
426-
#[cfg_attr(not(stage0), allow_internal_unstable(format_args_nl))]
424+
#[allow_internal_unstable(format_args_nl)]
427425
macro_rules! writeln {
428426
($dst:expr) => (
429427
write!($dst, "\n")

src/libcore/marker.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ unsafe impl<T: ?Sized> Freeze for &mut T {}
636636
/// [`Pin<P>`]: ../pin/struct.Pin.html
637637
/// [`pin module`]: ../../std/pin/index.html
638638
#[stable(feature = "pin", since = "1.33.0")]
639-
#[cfg_attr(not(stage0), lang = "unpin")]
639+
#[lang = "unpin"]
640640
pub auto trait Unpin {}
641641

642642
/// A marker type which does not implement `Unpin`.

src/libcore/num/mod.rs

-102
Original file line numberDiff line numberDiff line change
@@ -874,33 +874,6 @@ bounds instead of overflowing.
874874
875875
Basic usage:
876876
877-
```
878-
", $Feature, "assert_eq!(100", stringify!($SelfT), ".saturating_add(1), 101);
879-
assert_eq!(", stringify!($SelfT), "::max_value().saturating_add(100), ", stringify!($SelfT),
880-
"::max_value());",
881-
$EndFeature, "
882-
```"),
883-
#[stable(feature = "rust1", since = "1.0.0")]
884-
#[inline]
885-
#[cfg(stage0)]
886-
pub fn saturating_add(self, rhs: Self) -> Self {
887-
match self.checked_add(rhs) {
888-
Some(x) => x,
889-
None if rhs >= 0 => Self::max_value(),
890-
None => Self::min_value(),
891-
}
892-
}
893-
894-
}
895-
896-
doc_comment! {
897-
concat!("Saturating integer addition. Computes `self + rhs`, saturating at the numeric
898-
bounds instead of overflowing.
899-
900-
# Examples
901-
902-
Basic usage:
903-
904877
```
905878
", $Feature, "assert_eq!(100", stringify!($SelfT), ".saturating_add(1), 101);
906879
assert_eq!(", stringify!($SelfT), "::max_value().saturating_add(100), ", stringify!($SelfT),
@@ -911,37 +884,11 @@ $EndFeature, "
911884
#[stable(feature = "rust1", since = "1.0.0")]
912885
#[rustc_const_unstable(feature = "const_saturating_int_methods")]
913886
#[inline]
914-
#[cfg(not(stage0))]
915887
pub const fn saturating_add(self, rhs: Self) -> Self {
916888
intrinsics::saturating_add(self, rhs)
917889
}
918890
}
919891

920-
doc_comment! {
921-
concat!("Saturating integer subtraction. Computes `self - rhs`, saturating at the
922-
numeric bounds instead of overflowing.
923-
924-
# Examples
925-
926-
Basic usage:
927-
928-
```
929-
", $Feature, "assert_eq!(100", stringify!($SelfT), ".saturating_sub(127), -27);
930-
assert_eq!(", stringify!($SelfT), "::min_value().saturating_sub(100), ", stringify!($SelfT),
931-
"::min_value());",
932-
$EndFeature, "
933-
```"),
934-
#[stable(feature = "rust1", since = "1.0.0")]
935-
#[inline]
936-
#[cfg(stage0)]
937-
pub fn saturating_sub(self, rhs: Self) -> Self {
938-
match self.checked_sub(rhs) {
939-
Some(x) => x,
940-
None if rhs >= 0 => Self::min_value(),
941-
None => Self::max_value(),
942-
}
943-
}
944-
}
945892

946893
doc_comment! {
947894
concat!("Saturating integer subtraction. Computes `self - rhs`, saturating at the
@@ -960,7 +907,6 @@ $EndFeature, "
960907
#[stable(feature = "rust1", since = "1.0.0")]
961908
#[rustc_const_unstable(feature = "const_saturating_int_methods")]
962909
#[inline]
963-
#[cfg(not(stage0))]
964910
pub const fn saturating_sub(self, rhs: Self) -> Self {
965911
intrinsics::saturating_sub(self, rhs)
966912
}
@@ -2780,29 +2726,6 @@ the numeric bounds instead of overflowing.
27802726
27812727
Basic usage:
27822728
2783-
```
2784-
", $Feature, "assert_eq!(100", stringify!($SelfT), ".saturating_add(1), 101);
2785-
assert_eq!(200u8.saturating_add(127), 255);", $EndFeature, "
2786-
```"),
2787-
#[stable(feature = "rust1", since = "1.0.0")]
2788-
#[inline]
2789-
#[cfg(stage0)]
2790-
pub fn saturating_add(self, rhs: Self) -> Self {
2791-
match self.checked_add(rhs) {
2792-
Some(x) => x,
2793-
None => Self::max_value(),
2794-
}
2795-
}
2796-
}
2797-
2798-
doc_comment! {
2799-
concat!("Saturating integer addition. Computes `self + rhs`, saturating at
2800-
the numeric bounds instead of overflowing.
2801-
2802-
# Examples
2803-
2804-
Basic usage:
2805-
28062729
```
28072730
", $Feature, "assert_eq!(100", stringify!($SelfT), ".saturating_add(1), 101);
28082731
assert_eq!(200u8.saturating_add(127), 255);", $EndFeature, "
@@ -2811,7 +2734,6 @@ assert_eq!(200u8.saturating_add(127), 255);", $EndFeature, "
28112734
#[stable(feature = "rust1", since = "1.0.0")]
28122735
#[rustc_const_unstable(feature = "const_saturating_int_methods")]
28132736
#[inline]
2814-
#[cfg(not(stage0))]
28152737
pub const fn saturating_add(self, rhs: Self) -> Self {
28162738
intrinsics::saturating_add(self, rhs)
28172739
}
@@ -2825,37 +2747,13 @@ at the numeric bounds instead of overflowing.
28252747
28262748
Basic usage:
28272749
2828-
```
2829-
", $Feature, "assert_eq!(100", stringify!($SelfT), ".saturating_sub(27), 73);
2830-
assert_eq!(13", stringify!($SelfT), ".saturating_sub(127), 0);", $EndFeature, "
2831-
```"),
2832-
#[stable(feature = "rust1", since = "1.0.0")]
2833-
#[inline]
2834-
#[cfg(stage0)]
2835-
pub fn saturating_sub(self, rhs: Self) -> Self {
2836-
match self.checked_sub(rhs) {
2837-
Some(x) => x,
2838-
None => Self::min_value(),
2839-
}
2840-
}
2841-
}
2842-
2843-
doc_comment! {
2844-
concat!("Saturating integer subtraction. Computes `self - rhs`, saturating
2845-
at the numeric bounds instead of overflowing.
2846-
2847-
# Examples
2848-
2849-
Basic usage:
2850-
28512750
```
28522751
", $Feature, "assert_eq!(100", stringify!($SelfT), ".saturating_sub(27), 73);
28532752
assert_eq!(13", stringify!($SelfT), ".saturating_sub(127), 0);", $EndFeature, "
28542753
```"),
28552754
#[stable(feature = "rust1", since = "1.0.0")]
28562755
#[rustc_const_unstable(feature = "const_saturating_int_methods")]
28572756
#[inline]
2858-
#[cfg(not(stage0))]
28592757
pub const fn saturating_sub(self, rhs: Self) -> Self {
28602758
intrinsics::saturating_sub(self, rhs)
28612759
}

src/libcore/pin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ use ops::{Deref, DerefMut, Receiver, CoerceUnsized, DispatchFromDyn};
279279
// implementations, are allowed because they all only use `&P`, so they cannot move
280280
// the value behind `pointer`.
281281
#[stable(feature = "pin", since = "1.33.0")]
282-
#[cfg_attr(not(stage0), lang = "pin")]
282+
#[lang = "pin"]
283283
#[fundamental]
284284
#[repr(transparent)]
285285
#[derive(Copy, Clone, Hash, Eq, Ord)]

src/libcore/sync/atomic.rs

+4-12
Original file line numberDiff line numberDiff line change
@@ -290,15 +290,11 @@ pub enum Ordering {
290290
/// [`AtomicBool`]: struct.AtomicBool.html
291291
#[cfg(target_has_atomic = "8")]
292292
#[stable(feature = "rust1", since = "1.0.0")]
293-
#[cfg_attr(not(stage0), rustc_deprecated(
293+
#[rustc_deprecated(
294294
since = "1.34.0",
295295
reason = "the `new` function is now preferred",
296296
suggestion = "AtomicBool::new(false)",
297-
))]
298-
#[cfg_attr(stage0, rustc_deprecated(
299-
since = "1.34.0",
300-
reason = "the `new` function is now preferred",
301-
))]
297+
)]
302298
pub const ATOMIC_BOOL_INIT: AtomicBool = AtomicBool::new(false);
303299

304300
#[cfg(target_has_atomic = "8")]
@@ -1158,15 +1154,11 @@ macro_rules! atomic_int {
11581154

11591155
/// An atomic integer initialized to `0`.
11601156
#[$stable_init_const]
1161-
#[cfg_attr(stage0, rustc_deprecated(
1162-
since = "1.34.0",
1163-
reason = "the `new` function is now preferred",
1164-
))]
1165-
#[cfg_attr(not(stage0), rustc_deprecated(
1157+
#[rustc_deprecated(
11661158
since = "1.34.0",
11671159
reason = "the `new` function is now preferred",
11681160
suggestion = $atomic_new,
1169-
))]
1161+
)]
11701162
pub const $atomic_init: $atomic_type = $atomic_type::new(0);
11711163

11721164
#[$stable]

src/librustc_data_structures/macros.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/// A simple static assertion macro. The first argument should be a unique
22
/// ALL_CAPS identifier that describes the condition.
33
#[macro_export]
4-
#[cfg_attr(stage0, allow_internal_unstable)]
5-
#[cfg_attr(not(stage0), allow_internal_unstable(type_ascription))]
4+
#[allow_internal_unstable(type_ascription)]
65
macro_rules! static_assert {
76
($name:ident: $test:expr) => {
87
// Use the bool to access an array such that if the bool is false, the access

src/libstd/macros.rs

+6-12
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@
5353
/// ```
5454
#[macro_export]
5555
#[stable(feature = "rust1", since = "1.0.0")]
56-
#[cfg_attr(stage0, allow_internal_unstable)]
57-
#[cfg_attr(not(stage0), allow_internal_unstable(__rust_unstable_column, libstd_sys_internals))]
56+
#[allow_internal_unstable(__rust_unstable_column, libstd_sys_internals)]
5857
macro_rules! panic {
5958
() => ({
6059
panic!("explicit panic")
@@ -112,8 +111,7 @@ macro_rules! panic {
112111
/// ```
113112
#[macro_export]
114113
#[stable(feature = "rust1", since = "1.0.0")]
115-
#[cfg_attr(stage0, allow_internal_unstable)]
116-
#[cfg_attr(not(stage0), allow_internal_unstable(print_internals))]
114+
#[allow_internal_unstable(print_internals)]
117115
macro_rules! print {
118116
($($arg:tt)*) => ($crate::io::_print(format_args!($($arg)*)));
119117
}
@@ -145,8 +143,7 @@ macro_rules! print {
145143
/// ```
146144
#[macro_export]
147145
#[stable(feature = "rust1", since = "1.0.0")]
148-
#[cfg_attr(stage0, allow_internal_unstable)]
149-
#[cfg_attr(not(stage0), allow_internal_unstable(print_internals, format_args_nl))]
146+
#[allow_internal_unstable(print_internals, format_args_nl)]
150147
macro_rules! println {
151148
() => (print!("\n"));
152149
($($arg:tt)*) => ({
@@ -177,8 +174,7 @@ macro_rules! println {
177174
/// ```
178175
#[macro_export]
179176
#[stable(feature = "eprint", since = "1.19.0")]
180-
#[cfg_attr(stage0, allow_internal_unstable)]
181-
#[cfg_attr(not(stage0), allow_internal_unstable(print_internals))]
177+
#[allow_internal_unstable(print_internals)]
182178
macro_rules! eprint {
183179
($($arg:tt)*) => ($crate::io::_eprint(format_args!($($arg)*)));
184180
}
@@ -206,8 +202,7 @@ macro_rules! eprint {
206202
/// ```
207203
#[macro_export]
208204
#[stable(feature = "eprint", since = "1.19.0")]
209-
#[cfg_attr(stage0, allow_internal_unstable)]
210-
#[cfg_attr(not(stage0), allow_internal_unstable(print_internals, format_args_nl))]
205+
#[allow_internal_unstable(print_internals, format_args_nl)]
211206
macro_rules! eprintln {
212207
() => (eprint!("\n"));
213208
($($arg:tt)*) => ({
@@ -330,8 +325,7 @@ macro_rules! dbg {
330325
/// A macro to await on an async call.
331326
#[macro_export]
332327
#[unstable(feature = "await_macro", issue = "50547")]
333-
#[cfg_attr(stage0, allow_internal_unstable)]
334-
#[cfg_attr(not(stage0), allow_internal_unstable(gen_future, generators))]
328+
#[allow_internal_unstable(gen_future, generators)]
335329
#[allow_internal_unsafe]
336330
macro_rules! r#await {
337331
($e:expr) => { {

src/libstd/thread/local.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ impl<T: 'static> fmt::Debug for LocalKey<T> {
126126
/// [`std::thread::LocalKey`]: ../std/thread/struct.LocalKey.html
127127
#[macro_export]
128128
#[stable(feature = "rust1", since = "1.0.0")]
129-
#[cfg_attr(stage0, allow_internal_unstable)]
130-
#[cfg_attr(not(stage0), allow_internal_unstable(thread_local_internals))]
129+
#[allow_internal_unstable(thread_local_internals)]
131130
macro_rules! thread_local {
132131
// empty (base case for the recursion)
133132
() => {};
@@ -149,10 +148,7 @@ macro_rules! thread_local {
149148
reason = "should not be necessary",
150149
issue = "0")]
151150
#[macro_export]
152-
#[cfg_attr(stage0, allow_internal_unstable)]
153-
#[cfg_attr(not(stage0), allow_internal_unstable(
154-
thread_local_internals, cfg_target_thread_local, thread_local,
155-
))]
151+
#[allow_internal_unstable(thread_local_internals, cfg_target_thread_local, thread_local)]
156152
#[allow_internal_unsafe]
157153
macro_rules! __thread_local_inner {
158154
(@key $(#[$attr:meta])* $vis:vis $name:ident, $t:ty, $init:expr) => {

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-02-17
15+
date: 2019-02-27
1616
rustc: beta
1717
cargo: beta
1818

src/test/run-make-fulldeps/cross-lang-lto-clang/Makefile

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ all: cpp-executable rust-executable
99

1010
cpp-executable:
1111
$(RUSTC) -Clinker-plugin-lto=on -o $(TMPDIR)/librustlib-xlto.a -Copt-level=2 -Ccodegen-units=1 ./rustlib.rs
12-
$(CLANG) -flto=thin -fuse-ld=lld -L $(TMPDIR) -lrustlib-xlto -o $(TMPDIR)/cmain ./cmain.c -O3
12+
$(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) $(CLANG) -flto=thin -fuse-ld=lld -L $(TMPDIR) -lrustlib-xlto -o $(TMPDIR)/cmain ./cmain.c -O3
1313
# Make sure we don't find a call instruction to the function we expect to
1414
# always be inlined.
15-
llvm-objdump -d $(TMPDIR)/cmain | $(CGREP) -v -e "call.*rust_always_inlined"
15+
$(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-objdump -d $(TMPDIR)/cmain | $(CGREP) -v -e "call.*rust_always_inlined"
1616
# As a sanity check, make sure we do find a call instruction to a
1717
# non-inlined function
18-
llvm-objdump -d $(TMPDIR)/cmain | $(CGREP) -e "call.*rust_never_inlined"
18+
$(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-objdump -d $(TMPDIR)/cmain | $(CGREP) -e "call.*rust_never_inlined"
1919

2020
rust-executable:
21-
$(CLANG) ./clib.c -flto=thin -c -o $(TMPDIR)/clib.o -O2
21+
$(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) $(CLANG) ./clib.c -flto=thin -c -o $(TMPDIR)/clib.o -O2
2222
(cd $(TMPDIR); $(AR) crus ./libxyz.a ./clib.o)
2323
$(RUSTC) -Clinker-plugin-lto=on -L$(TMPDIR) -Copt-level=2 -Clinker=$(CLANG) -Clink-arg=-fuse-ld=lld ./main.rs -o $(TMPDIR)/rsmain
24-
llvm-objdump -d $(TMPDIR)/rsmain | $(CGREP) -e "call.*c_never_inlined"
25-
llvm-objdump -d $(TMPDIR)/rsmain | $(CGREP) -v -e "call.*c_always_inlined"
24+
$(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-objdump -d $(TMPDIR)/rsmain | $(CGREP) -e "call.*c_never_inlined"
25+
$(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-objdump -d $(TMPDIR)/rsmain | $(CGREP) -v -e "call.*c_always_inlined"

0 commit comments

Comments
 (0)