1
Fork 0

Auto merge of #90042 - pietroalbini:1.56-master, r=Mark-Simulacrum

Bump bootstrap compiler to 1.57

Fixes https://github.com/rust-lang/rust/issues/90152

r? `@Mark-Simulacrum`
This commit is contained in:
bors 2021-10-25 11:31:47 +00:00
commit 235d9853d8
20 changed files with 355 additions and 378 deletions

View file

@ -2,7 +2,6 @@
#![feature(bool_to_option)]
#![feature(box_patterns)]
#![cfg_attr(bootstrap, feature(const_panic))]
#![feature(crate_visibility_modifier)]
#![feature(format_args_capture)]
#![feature(in_band_lifetimes)]

View file

@ -11,7 +11,6 @@
#![feature(associated_type_bounds)]
#![feature(auto_traits)]
#![feature(bool_to_option)]
#![cfg_attr(bootstrap, feature(const_panic))]
#![feature(control_flow_enum)]
#![feature(core_intrinsics)]
#![feature(extend_one)]

View file

@ -124,10 +124,7 @@ macro_rules! newtype_index {
#[inline]
$v const fn from_usize(value: usize) -> Self {
#[cfg(not(bootstrap))]
assert!(value <= ($max as usize));
#[cfg(bootstrap)]
[()][(value > ($max as usize)) as usize];
unsafe {
Self::from_u32_unchecked(value as u32)
}
@ -135,10 +132,7 @@ macro_rules! newtype_index {
#[inline]
$v const fn from_u32(value: u32) -> Self {
#[cfg(not(bootstrap))]
assert!(value <= $max);
#[cfg(bootstrap)]
[()][(value > $max) as usize];
unsafe {
Self::from_u32_unchecked(value)
}

View file

@ -64,6 +64,13 @@ where
}
}
/// Allows inspection of unreachable basic blocks even with `debug_assertions` enabled.
#[cfg(test)]
pub(crate) fn allow_unreachable(&mut self) {
#[cfg(debug_assertions)]
self.reachable_blocks.insert_all()
}
/// Returns the underlying `Results`.
pub fn results(&self) -> &Results<'tcx, A> {
&self.results.borrow()

View file

@ -268,6 +268,8 @@ fn test_cursor<D: Direction>(analysis: MockAnalysis<'tcx, D>) {
let mut cursor =
Results { entry_sets: analysis.mock_entry_sets(), analysis }.into_results_cursor(body);
cursor.allow_unreachable();
let every_target = || {
body.basic_blocks()
.iter_enumerated()

View file

@ -2,7 +2,6 @@
#![feature(bool_to_option)]
#![feature(box_patterns)]
#![feature(box_syntax)]
#![cfg_attr(bootstrap, feature(const_panic))]
#![feature(exact_size_is_empty)]
#![feature(in_band_lifetimes)]
#![feature(iter_zip)]

View file

@ -1,7 +1,6 @@
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(crate_visibility_modifier)]
#![cfg_attr(bootstrap, feature(const_panic))]
#![feature(in_band_lifetimes)]
#![feature(iter_zip)]
#![feature(let_else)]