Skip to content

Commit 56e40f6

Browse files
authored
Rollup merge of rust-lang#74395 - Mark-Simulacrum:stage0-next, r=pietroalbini
Bump version to 1.47 This also bumps to a more recent rustfmt version, just to keep us relatively up to date (though almost nothing has changed in rustfmt we use beyond bumps to the parser infra). No formatting changes as a result of this. r? @pietroalbini
2 parents 1d1261a + aba1242 commit 56e40f6

File tree

33 files changed

+16
-80
lines changed

33 files changed

+16
-80
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.46.0";
16+
pub const CFG_RELEASE_NUM: &str = "1.47.0";
1717

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

src/bootstrap/compile.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,7 @@ fn copy_self_contained_objects(
159159
compiler: &Compiler,
160160
target: Interned<String>,
161161
) -> Vec<(PathBuf, DependencyType)> {
162-
// cfg(bootstrap)
163-
// Remove when upgrading bootstrap compiler.
164-
let libdir_self_contained = if compiler.stage == 0 {
165-
builder.sysroot_libdir(*compiler, target).to_path_buf()
166-
} else {
167-
builder.sysroot_libdir(*compiler, target).join("self-contained")
168-
};
162+
let libdir_self_contained = builder.sysroot_libdir(*compiler, target).join("self-contained");
169163
t!(fs::create_dir_all(&libdir_self_contained));
170164
let mut target_deps = vec![];
171165

src/liballoc/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
#![feature(const_generic_impls_guard)]
8888
#![feature(const_generics)]
8989
#![feature(const_in_array_repeat_expressions)]
90-
#![cfg_attr(bootstrap, feature(const_if_match))]
9190
#![feature(cow_is_borrowed)]
9291
#![feature(deque_range)]
9392
#![feature(dispatch_from_dyn)]

src/libcore/intrinsics.rs

-7
Original file line numberDiff line numberDiff line change
@@ -1927,7 +1927,6 @@ extern "rust-intrinsic" {
19271927
/// The to-be-stabilized version of this intrinsic is
19281928
/// [`std::mem::variant_count`](../../std/mem/fn.variant_count.html)
19291929
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
1930-
#[cfg(not(bootstrap))]
19311930
pub fn variant_count<T>() -> usize;
19321931

19331932
/// Rust's "try catch" construct which invokes the function pointer `try_fn`
@@ -1958,7 +1957,6 @@ extern "rust-intrinsic" {
19581957
/// Internal placeholder for injecting code coverage counters when the "instrument-coverage"
19591958
/// option is enabled. The placeholder is replaced with `llvm.instrprof.increment` during code
19601959
/// generation.
1961-
#[cfg(not(bootstrap))]
19621960
#[lang = "count_code_region"]
19631961
pub fn count_code_region(index: u32, start_byte_pos: u32, end_byte_pos: u32);
19641962

@@ -1968,7 +1966,6 @@ extern "rust-intrinsic" {
19681966
/// "coverage map", which is injected into the generated code, as additional data.
19691967
/// This marker identifies a code region and two other counters or counter expressions
19701968
/// whose sum is the number of times the code region was executed.
1971-
#[cfg(not(bootstrap))]
19721969
pub fn coverage_counter_add(
19731970
index: u32,
19741971
left_index: u32,
@@ -1980,7 +1977,6 @@ extern "rust-intrinsic" {
19801977
/// This marker identifies a code region and two other counters or counter expressions
19811978
/// whose difference is the number of times the code region was executed.
19821979
/// (See `coverage_counter_add` for more information.)
1983-
#[cfg(not(bootstrap))]
19841980
pub fn coverage_counter_subtract(
19851981
index: u32,
19861982
left_index: u32,
@@ -1992,17 +1988,14 @@ extern "rust-intrinsic" {
19921988
/// This marker identifies a code region to be added to the "coverage map" to indicate source
19931989
/// code that can never be reached.
19941990
/// (See `coverage_counter_add` for more information.)
1995-
#[cfg(not(bootstrap))]
19961991
pub fn coverage_unreachable(start_byte_pos: u32, end_byte_pos: u32);
19971992

19981993
/// See documentation of `<*const T>::guaranteed_eq` for details.
19991994
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
2000-
#[cfg(not(bootstrap))]
20011995
pub fn ptr_guaranteed_eq<T>(ptr: *const T, other: *const T) -> bool;
20021996

20031997
/// See documentation of `<*const T>::guaranteed_ne` for details.
20041998
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
2005-
#[cfg(not(bootstrap))]
20061999
pub fn ptr_guaranteed_ne<T>(ptr: *const T, other: *const T) -> bool;
20072000
}
20082001

src/libcore/lib.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@
7373
#![feature(const_ascii_ctype_on_intrinsics)]
7474
#![feature(const_alloc_layout)]
7575
#![feature(const_discriminant)]
76-
#![cfg_attr(bootstrap, feature(const_if_match))]
77-
#![cfg_attr(bootstrap, feature(const_loop))]
7876
#![feature(const_checked_int_methods)]
7977
#![feature(const_euclidean_int_methods)]
8078
#![feature(const_overflowing_int_methods)]
@@ -87,7 +85,7 @@
8785
#![feature(const_generics)]
8886
#![feature(const_ptr_offset)]
8987
#![feature(const_ptr_offset_from)]
90-
#![cfg_attr(not(bootstrap), feature(const_raw_ptr_comparison))]
88+
#![feature(const_raw_ptr_comparison)]
9189
#![feature(const_result)]
9290
#![feature(const_slice_from_raw_parts)]
9391
#![feature(const_slice_ptr_len)]
@@ -121,13 +119,12 @@
121119
#![feature(staged_api)]
122120
#![feature(std_internals)]
123121
#![feature(stmt_expr_attributes)]
124-
#![cfg_attr(bootstrap, feature(track_caller))]
125122
#![feature(transparent_unions)]
126123
#![feature(unboxed_closures)]
127124
#![feature(unsized_locals)]
128125
#![feature(untagged_unions)]
129126
#![feature(unwind_attributes)]
130-
#![cfg_attr(not(bootstrap), feature(variant_count))]
127+
#![feature(variant_count)]
131128
#![feature(doc_alias)]
132129
#![feature(mmx_target_feature)]
133130
#![feature(tbm_target_feature)]
@@ -142,7 +139,7 @@
142139
#![feature(rtm_target_feature)]
143140
#![feature(f16c_target_feature)]
144141
#![feature(hexagon_target_feature)]
145-
#![cfg_attr(not(bootstrap), feature(const_fn_transmute))]
142+
#![feature(const_fn_transmute)]
146143
#![feature(abi_unadjusted)]
147144
#![feature(adx_target_feature)]
148145
#![feature(maybe_uninit_slice)]
@@ -293,7 +290,7 @@ pub mod primitive;
293290
)]
294291
// FIXME: This annotation should be moved into rust-lang/stdarch after clashing_extern_declarations is
295292
// merged. It currently cannot because bootstrap fails as the lint hasn't been defined yet.
296-
#[cfg_attr(not(bootstrap), allow(clashing_extern_declarations))]
293+
#[allow(clashing_extern_declarations)]
297294
#[unstable(feature = "stdsimd", issue = "48556")]
298295
mod core_arch;
299296

src/libcore/mem/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,6 @@ pub const fn discriminant<T>(v: &T) -> Discriminant<T> {
10371037
/// assert_eq!(mem::variant_count::<Result<!, !>>(), 2);
10381038
/// ```
10391039
#[inline(always)]
1040-
#[cfg(not(bootstrap))]
10411040
#[unstable(feature = "variant_count", issue = "73662")]
10421041
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
10431042
pub const fn variant_count<T>() -> usize {

src/libcore/num/mod.rs

-11
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ macro_rules! try_opt {
2121
};
2222
}
2323

24-
#[cfg(bootstrap)]
25-
macro_rules! unlikely {
26-
($e: expr) => {
27-
$e
28-
};
29-
}
30-
31-
#[cfg(not(bootstrap))]
3224
#[allow_internal_unstable(const_likely)]
3325
macro_rules! unlikely {
3426
($e: expr) => {
@@ -1600,7 +1592,6 @@ $EndFeature, "
16001592
#[stable(feature = "no_panic_abs", since = "1.13.0")]
16011593
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
16021594
#[allow(unused_attributes)]
1603-
#[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
16041595
#[inline]
16051596
pub const fn wrapping_abs(self) -> Self {
16061597
if self.is_negative() {
@@ -1889,7 +1880,6 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_neg(), (", stringify!($Self
18891880
#[stable(feature = "wrapping", since = "1.7.0")]
18901881
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
18911882
#[allow(unused_attributes)]
1892-
#[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
18931883
pub const fn overflowing_neg(self) -> (Self, bool) {
18941884
if unlikely!(self == Self::MIN) {
18951885
(Self::MIN, true)
@@ -2182,7 +2172,6 @@ $EndFeature, "
21822172
#[stable(feature = "rust1", since = "1.0.0")]
21832173
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
21842174
#[allow(unused_attributes)]
2185-
#[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
21862175
#[inline]
21872176
#[rustc_inherit_overflow_checks]
21882177
pub const fn abs(self) -> Self {

src/libcore/ops/function.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ pub trait FnMut<Args>: FnOnce<Args> {
224224
#[must_use = "closures are lazy and do nothing unless called"]
225225
pub trait FnOnce<Args> {
226226
/// The returned type after the call operator is used.
227-
#[cfg_attr(not(bootstrap), lang = "fn_once_output")]
227+
#[lang = "fn_once_output"]
228228
#[stable(feature = "fn_once_output", since = "1.12.0")]
229229
type Output;
230230

src/libcore/ptr/const_ptr.rs

-2
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ impl<T: ?Sized> *const T {
324324
#[unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
325325
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
326326
#[inline]
327-
#[cfg(not(bootstrap))]
328327
pub const fn guaranteed_eq(self, other: *const T) -> bool
329328
where
330329
T: Sized,
@@ -356,7 +355,6 @@ impl<T: ?Sized> *const T {
356355
#[unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
357356
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
358357
#[inline]
359-
#[cfg(not(bootstrap))]
360358
pub const fn guaranteed_ne(self, other: *const T) -> bool
361359
where
362360
T: Sized,

src/libcore/ptr/mut_ptr.rs

-2
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ impl<T: ?Sized> *mut T {
305305
#[unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
306306
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
307307
#[inline]
308-
#[cfg(not(bootstrap))]
309308
pub const fn guaranteed_eq(self, other: *mut T) -> bool
310309
where
311310
T: Sized,
@@ -337,7 +336,6 @@ impl<T: ?Sized> *mut T {
337336
#[unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
338337
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
339338
#[inline]
340-
#[cfg(not(bootstrap))]
341339
pub const unsafe fn guaranteed_ne(self, other: *mut T) -> bool
342340
where
343341
T: Sized,

src/libcore/slice/mod.rs

-12
Original file line numberDiff line numberDiff line change
@@ -6233,14 +6233,8 @@ where
62336233
return false;
62346234
}
62356235

6236-
#[cfg(bootstrap)]
6237-
if self.as_ptr() == other.as_ptr() {
6238-
return true;
6239-
}
6240-
62416236
// While performance would suffer if `guaranteed_eq` just returned `false`
62426237
// for all arguments, correctness and return value of this function are not affected.
6243-
#[cfg(not(bootstrap))]
62446238
if self.as_ptr().guaranteed_eq(other.as_ptr()) {
62456239
return true;
62466240
}
@@ -6259,14 +6253,8 @@ where
62596253
return false;
62606254
}
62616255

6262-
#[cfg(bootstrap)]
6263-
if self.as_ptr() == other.as_ptr() {
6264-
return true;
6265-
}
6266-
62676256
// While performance would suffer if `guaranteed_eq` just returned `false`
62686257
// for all arguments, correctness and return value of this function are not affected.
6269-
#[cfg(not(bootstrap))]
62706258
if self.as_ptr().guaranteed_eq(other.as_ptr()) {
62716259
return true;
62726260
}

src/libpanic_abort/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
use core::any::Any;
2222

2323
#[rustc_std_internal_symbol]
24-
#[cfg_attr(not(bootstrap), allow(improper_ctypes_definitions))]
24+
#[allow(improper_ctypes_definitions)]
2525
pub unsafe extern "C" fn __rust_panic_cleanup(_: *mut u8) -> *mut (dyn Any + Send + 'static) {
2626
unreachable!()
2727
}

src/libpanic_unwind/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extern "C" {
8181
mod dwarf;
8282

8383
#[rustc_std_internal_symbol]
84-
#[cfg_attr(not(bootstrap), allow(improper_ctypes_definitions))]
84+
#[allow(improper_ctypes_definitions)]
8585
pub unsafe extern "C" fn __rust_panic_cleanup(payload: *mut u8) -> *mut (dyn Any + Send + 'static) {
8686
Box::into_raw(imp::cleanup(payload))
8787
}

src/librustc_ast/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))]
88
#![feature(bool_to_option)]
99
#![feature(box_syntax)]
10-
#![cfg_attr(bootstrap, feature(const_if_match))]
1110
#![feature(const_fn)] // For the `transmute` in `P::new`
1211
#![feature(const_panic)]
13-
#![cfg_attr(not(bootstrap), feature(const_fn_transmute))]
12+
#![feature(const_fn_transmute)]
1413
#![feature(crate_visibility_modifier)]
1514
#![feature(label_break_value)]
1615
#![feature(nll)]

src/librustc_driver/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
77
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
88
#![feature(nll)]
9-
#![cfg_attr(bootstrap, feature(track_caller))]
109
#![recursion_limit = "256"]
1110

1211
#[macro_use]

src/librustc_errors/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
66
#![feature(crate_visibility_modifier)]
77
#![feature(nll)]
8-
#![cfg_attr(bootstrap, feature(track_caller))]
98

109
pub use emitter::ColorConfig;
1110

src/librustc_hir/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/hir.html
44
55
#![feature(crate_visibility_modifier)]
6-
#![cfg_attr(bootstrap, feature(const_if_match))]
76
#![feature(const_fn)] // For the unsizing cast on `&[]`
87
#![feature(const_panic)]
98
#![feature(in_band_lifetimes)]

src/librustc_index/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(allow_internal_unstable)]
2-
#![cfg_attr(bootstrap, feature(const_if_match))]
32
#![feature(const_fn)]
43
#![feature(const_panic)]
54
#![feature(extend_one)]

src/librustc_infer/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#![feature(box_patterns)]
1818
#![feature(box_syntax)]
1919
#![feature(const_fn)]
20-
#![cfg_attr(bootstrap, feature(const_if_match))]
2120
#![feature(const_panic)]
2221
#![feature(extend_one)]
2322
#![feature(never_type)]

src/librustc_lint/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#![feature(never_type)]
3535
#![feature(nll)]
3636
#![feature(or_patterns)]
37-
#![cfg_attr(bootstrap, feature(track_caller))]
3837
#![recursion_limit = "256"]
3938

4039
#[macro_use]

src/librustc_llvm/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub struct RustString {
1515

1616
/// Appending to a Rust string -- used by RawRustStringOstream.
1717
#[no_mangle]
18-
#[cfg_attr(not(bootstrap), allow(improper_ctypes_definitions))]
18+
#[allow(improper_ctypes_definitions)]
1919
pub unsafe extern "C" fn LLVMRustStringWriteImpl(
2020
sr: &RustString,
2121
ptr: *const c_char,

src/librustc_middle/lib.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@
2727
#![feature(bool_to_option)]
2828
#![feature(box_patterns)]
2929
#![feature(box_syntax)]
30-
#![cfg_attr(bootstrap, feature(const_if_match))]
3130
#![feature(const_fn)]
3231
#![feature(const_panic)]
33-
#![cfg_attr(not(bootstrap), feature(const_fn_transmute))]
32+
#![feature(const_fn_transmute)]
3433
#![feature(core_intrinsics)]
3534
#![feature(discriminant_kind)]
3635
#![feature(drain_filter)]
@@ -42,7 +41,6 @@
4241
#![feature(or_patterns)]
4342
#![feature(range_is_empty)]
4443
#![feature(min_specialization)]
45-
#![cfg_attr(bootstrap, feature(track_caller))]
4644
#![feature(trusted_len)]
4745
#![feature(stmt_expr_attributes)]
4846
#![feature(test)]

src/librustc_mir/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Rust MIR: a lowered representation of Rust.
1010
#![feature(box_patterns)]
1111
#![feature(box_syntax)]
1212
#![feature(const_fn)]
13-
#![cfg_attr(bootstrap, feature(const_if_match))]
14-
#![cfg_attr(bootstrap, feature(const_loop))]
1513
#![feature(const_panic)]
1614
#![feature(crate_visibility_modifier)]
1715
#![feature(decl_macro)]

src/librustc_mir_build/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
55
#![feature(box_patterns)]
66
#![feature(box_syntax)]
7-
#![cfg_attr(bootstrap, feature(const_if_match))]
87
#![feature(const_fn)]
98
#![feature(const_panic)]
109
#![feature(crate_visibility_modifier)]

src/librustc_passes/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#![feature(in_band_lifetimes)]
99
#![feature(nll)]
1010
#![feature(or_patterns)]
11-
#![cfg_attr(bootstrap, feature(track_caller))]
1211
#![recursion_limit = "256"]
1312

1413
#[macro_use]

src/librustc_privacy/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![feature(in_band_lifetimes)]
33
#![feature(nll)]
44
#![feature(or_patterns)]
5-
#![cfg_attr(bootstrap, feature(track_caller))]
65
#![recursion_limit = "256"]
76

87
use rustc_attr as attr;

src/librustc_query_system/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![feature(bool_to_option)]
22
#![feature(const_fn)]
3-
#![cfg_attr(bootstrap, feature(const_if_match))]
43
#![feature(const_panic)]
54
#![feature(core_intrinsics)]
65
#![feature(hash_raw_entry)]

0 commit comments

Comments
 (0)