Skip to content

Commit 235d985

Browse files
committed
Auto merge of #90042 - pietroalbini:1.56-master, r=Mark-Simulacrum
Bump bootstrap compiler to 1.57 Fixes #90152 r? `@Mark-Simulacrum`
2 parents 32f3887 + abd3fe3 commit 235d985

File tree

20 files changed

+355
-378
lines changed

20 files changed

+355
-378
lines changed

compiler/rustc_borrowck/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
#![feature(bool_to_option)]
44
#![feature(box_patterns)]
5-
#![cfg_attr(bootstrap, feature(const_panic))]
65
#![feature(crate_visibility_modifier)]
76
#![feature(format_args_capture)]
87
#![feature(in_band_lifetimes)]

compiler/rustc_data_structures/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#![feature(associated_type_bounds)]
1212
#![feature(auto_traits)]
1313
#![feature(bool_to_option)]
14-
#![cfg_attr(bootstrap, feature(const_panic))]
1514
#![feature(control_flow_enum)]
1615
#![feature(core_intrinsics)]
1716
#![feature(extend_one)]

compiler/rustc_index/src/vec.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,21 +124,15 @@ macro_rules! newtype_index {
124124

125125
#[inline]
126126
$v const fn from_usize(value: usize) -> Self {
127-
#[cfg(not(bootstrap))]
128127
assert!(value <= ($max as usize));
129-
#[cfg(bootstrap)]
130-
[()][(value > ($max as usize)) as usize];
131128
unsafe {
132129
Self::from_u32_unchecked(value as u32)
133130
}
134131
}
135132

136133
#[inline]
137134
$v const fn from_u32(value: u32) -> Self {
138-
#[cfg(not(bootstrap))]
139135
assert!(value <= $max);
140-
#[cfg(bootstrap)]
141-
[()][(value > $max) as usize];
142136
unsafe {
143137
Self::from_u32_unchecked(value)
144138
}

compiler/rustc_mir_dataflow/src/framework/cursor.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ where
6464
}
6565
}
6666

67+
/// Allows inspection of unreachable basic blocks even with `debug_assertions` enabled.
68+
#[cfg(test)]
69+
pub(crate) fn allow_unreachable(&mut self) {
70+
#[cfg(debug_assertions)]
71+
self.reachable_blocks.insert_all()
72+
}
73+
6774
/// Returns the underlying `Results`.
6875
pub fn results(&self) -> &Results<'tcx, A> {
6976
&self.results.borrow()

compiler/rustc_mir_dataflow/src/framework/tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ fn test_cursor<D: Direction>(analysis: MockAnalysis<'tcx, D>) {
268268
let mut cursor =
269269
Results { entry_sets: analysis.mock_entry_sets(), analysis }.into_results_cursor(body);
270270

271+
cursor.allow_unreachable();
272+
271273
let every_target = || {
272274
body.basic_blocks()
273275
.iter_enumerated()

compiler/rustc_mir_dataflow/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![feature(bool_to_option)]
33
#![feature(box_patterns)]
44
#![feature(box_syntax)]
5-
#![cfg_attr(bootstrap, feature(const_panic))]
65
#![feature(exact_size_is_empty)]
76
#![feature(in_band_lifetimes)]
87
#![feature(iter_zip)]

compiler/rustc_mir_transform/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![feature(box_patterns)]
22
#![feature(box_syntax)]
33
#![feature(crate_visibility_modifier)]
4-
#![cfg_attr(bootstrap, feature(const_panic))]
54
#![feature(in_band_lifetimes)]
65
#![feature(iter_zip)]
76
#![feature(let_else)]

library/alloc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
//
157157
// Rustdoc features:
158158
#![feature(doc_cfg)]
159-
#![cfg_attr(not(bootstrap), feature(doc_cfg_hide))]
159+
#![feature(doc_cfg_hide)]
160160
// Technically, this is a bug in rustdoc: rustdoc sees the documentation on `#[lang = slice_alloc]`
161161
// blocks is for `&[T]`, which also has documentation using this feature in `core`, and gets mad
162162
// that the feature-gate isn't enabled. Ideally, it wouldn't check for the feature gate for docs

library/core/src/clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
#[stable(feature = "rust1", since = "1.0.0")]
106106
#[lang = "clone"]
107107
#[rustc_diagnostic_item = "Clone"]
108-
#[cfg_attr(not(bootstrap), rustc_trivial_field_reads)]
108+
#[rustc_trivial_field_reads]
109109
pub trait Clone: Sized {
110110
/// Returns a copy of the value.
111111
///

library/core/src/fmt/mod.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ impl<'a> Arguments<'a> {
374374
/// valid index of `args`.
375375
/// 3. Every [`Count::Param`] within `fmt` must contain a valid index of
376376
/// `args`.
377-
#[cfg(not(bootstrap))]
378377
#[doc(hidden)]
379378
#[inline]
380379
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
@@ -388,19 +387,6 @@ impl<'a> Arguments<'a> {
388387
Arguments { pieces, fmt: Some(fmt), args }
389388
}
390389

391-
#[cfg(bootstrap)]
392-
#[doc(hidden)]
393-
#[inline]
394-
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
395-
#[rustc_const_unstable(feature = "const_fmt_arguments_new", issue = "none")]
396-
pub const unsafe fn new_v1_formatted(
397-
pieces: &'a [&'static str],
398-
args: &'a [ArgumentV1<'a>],
399-
fmt: &'a [rt::v1::Argument],
400-
) -> Arguments<'a> {
401-
Arguments { pieces, fmt: Some(fmt), args }
402-
}
403-
404390
/// Estimates the length of the formatted text.
405391
///
406392
/// This is intended to be used for setting initial `String` capacity
@@ -619,7 +605,7 @@ impl Display for Arguments<'_> {
619605
)]
620606
#[doc(alias = "{:?}")]
621607
#[rustc_diagnostic_item = "Debug"]
622-
#[cfg_attr(not(bootstrap), rustc_trivial_field_reads)]
608+
#[rustc_trivial_field_reads]
623609
pub trait Debug {
624610
/// Formats the value using the given formatter.
625611
///

0 commit comments

Comments
 (0)