Skip to content

Commit 235d985

Browse files
committed
Auto merge of rust-lang#90042 - pietroalbini:1.56-master, r=Mark-Simulacrum
Bump bootstrap compiler to 1.57 Fixes rust-lang#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

Diff for: compiler/rustc_borrowck/src/lib.rs

-1
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)]

Diff for: compiler/rustc_data_structures/src/lib.rs

-1
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)]

Diff for: compiler/rustc_index/src/vec.rs

-6
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
}

Diff for: compiler/rustc_mir_dataflow/src/framework/cursor.rs

+7
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()

Diff for: compiler/rustc_mir_dataflow/src/framework/tests.rs

+2
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()

Diff for: compiler/rustc_mir_dataflow/src/lib.rs

-1
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)]

Diff for: compiler/rustc_mir_transform/src/lib.rs

-1
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)]

Diff for: library/alloc/src/lib.rs

+1-1
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

Diff for: library/core/src/clone.rs

+1-1
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
///

Diff for: library/core/src/fmt/mod.rs

+1-15
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
///

Diff for: library/core/src/intrinsics.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2252,7 +2252,6 @@ pub unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
22522252
/// or have any other observable side-effects, the behavior is undefined.
22532253
///
22542254
/// [referential transparency]: https://en.wikipedia.org/wiki/Referential_transparency
2255-
#[cfg(not(bootstrap))]
22562255
#[unstable(
22572256
feature = "const_eval_select",
22582257
issue = "none",
@@ -2273,7 +2272,6 @@ where
22732272
called_at_rt.call_once(arg)
22742273
}
22752274

2276-
#[cfg(not(bootstrap))]
22772275
#[unstable(
22782276
feature = "const_eval_select",
22792277
issue = "none",

Diff for: library/core/src/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152
#![feature(const_fn_trait_bound)]
153153
#![feature(const_impl_trait)]
154154
#![feature(const_mut_refs)]
155-
#![cfg_attr(bootstrap, feature(const_panic))]
156155
#![feature(const_precise_live_drops)]
157156
#![feature(const_raw_ptr_deref)]
158157
#![feature(const_refs_to_cell)]
@@ -161,7 +160,7 @@
161160
#![feature(doc_notable_trait)]
162161
#![feature(doc_primitive)]
163162
#![feature(exhaustive_patterns)]
164-
#![cfg_attr(not(bootstrap), feature(doc_cfg_hide))]
163+
#![feature(doc_cfg_hide)]
165164
#![feature(extern_types)]
166165
#![feature(fundamental)]
167166
#![feature(if_let_guard)]
@@ -172,7 +171,7 @@
172171
#![feature(llvm_asm)]
173172
#![feature(min_specialization)]
174173
#![feature(mixed_integer_ops)]
175-
#![cfg_attr(not(bootstrap), feature(must_not_suspend))]
174+
#![feature(must_not_suspend)]
176175
#![feature(negative_impls)]
177176
#![feature(never_type)]
178177
#![feature(no_core)]

Diff for: library/core/src/marker.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ use crate::hash::Hasher;
3030
/// [arc]: ../../std/sync/struct.Arc.html
3131
/// [ub]: ../../reference/behavior-considered-undefined.html
3232
#[stable(feature = "rust1", since = "1.0.0")]
33-
#[cfg_attr(all(not(test), bootstrap), rustc_diagnostic_item = "send_trait")]
34-
#[cfg_attr(all(not(test), not(bootstrap)), rustc_diagnostic_item = "Send")]
33+
#[cfg_attr(not(test), rustc_diagnostic_item = "Send")]
3534
#[rustc_on_unimplemented(
3635
message = "`{Self}` cannot be sent between threads safely",
3736
label = "`{Self}` cannot be sent between threads safely"

Diff for: library/core/src/panicking.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub fn panic_str(expr: &str) -> ! {
5959

6060
#[inline]
6161
#[track_caller]
62-
#[cfg_attr(not(bootstrap), lang = "panic_display")] // needed for const-evaluated panics
62+
#[lang = "panic_display"] // needed for const-evaluated panics
6363
pub fn panic_display<T: fmt::Display>(x: &T) -> ! {
6464
panic_fmt(format_args!("{}", *x));
6565
}

Diff for: library/core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#![feature(const_cell_into_inner)]
1212
#![feature(const_convert)]
1313
#![feature(const_maybe_uninit_assume_init)]
14-
#![cfg_attr(bootstrap, feature(const_panic))]
1514
#![feature(const_ptr_read)]
1615
#![feature(const_ptr_write)]
1716
#![feature(const_ptr_offset)]

Diff for: library/std/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
#![feature(custom_test_frameworks)]
273273
#![feature(decl_macro)]
274274
#![feature(doc_cfg)]
275-
#![cfg_attr(not(bootstrap), feature(doc_cfg_hide))]
275+
#![feature(doc_cfg_hide)]
276276
#![feature(doc_keyword)]
277277
#![feature(doc_masked)]
278278
#![feature(doc_notable_trait)]
@@ -308,7 +308,7 @@
308308
#![feature(maybe_uninit_uninit_array)]
309309
#![feature(min_specialization)]
310310
#![feature(mixed_integer_ops)]
311-
#![cfg_attr(not(bootstrap), feature(must_not_suspend))]
311+
#![feature(must_not_suspend)]
312312
#![feature(needs_panic_runtime)]
313313
#![feature(negative_impls)]
314314
#![feature(never_type)]

Diff for: src/bootstrap/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ pub struct Build {
277277
struct Crate {
278278
name: Interned<String>,
279279
deps: HashSet<Interned<String>>,
280-
id: String,
281280
path: PathBuf,
282281
}
283282

Diff for: src/bootstrap/metadata.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ struct Output {
1414

1515
#[derive(Deserialize)]
1616
struct Package {
17-
id: String,
1817
name: String,
1918
source: Option<String>,
2019
manifest_path: String,
@@ -50,7 +49,7 @@ pub fn build(build: &mut Build) {
5049
.filter(|dep| dep.source.is_none())
5150
.map(|dep| INTERNER.intern_string(dep.name))
5251
.collect();
53-
build.crates.insert(name, Crate { name, id: package.id, deps, path });
52+
build.crates.insert(name, Crate { name, deps, path });
5453
}
5554
}
5655
}

0 commit comments

Comments
 (0)