Skip to content

Commit 7ecd83e

Browse files
committed
Auto merge of rust-lang#94290 - Mark-Simulacrum:bump-bootstrap, r=pietroalbini
Bump bootstrap to 1.60 This bumps the bootstrap compiler to 1.60 and cleans up cfgs and Span's rustc_pass_by_value (enabled by the bootstrap bump).
2 parents c63c7ba + 26a34f1 commit 7ecd83e

File tree

14 files changed

+25
-95
lines changed

14 files changed

+25
-95
lines changed

alloc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@
139139
#![feature(associated_type_bounds)]
140140
#![feature(box_syntax)]
141141
#![feature(cfg_sanitize)]
142-
#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
143142
#![feature(const_deref)]
144143
#![feature(const_fn_trait_bound)]
145144
#![feature(const_mut_refs)]

core/src/intrinsics.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,6 @@ extern "rust-intrinsic" {
19361936
/// - If the `ptr` is created in an another const, this intrinsic doesn't deallocate it.
19371937
/// - If the `ptr` is pointing to a local variable, this intrinsic doesn't deallocate it.
19381938
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
1939-
#[cfg(not(bootstrap))]
19401939
pub fn const_deallocate(ptr: *mut u8, size: usize, align: usize);
19411940

19421941
/// Determines whether the raw bytes of the two values are equal.

core/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
#![feature(associated_type_bounds)]
157157
#![feature(auto_traits)]
158158
#![feature(cfg_target_has_atomic)]
159-
#![cfg_attr(not(bootstrap), feature(cfg_target_has_atomic_equal_alignment))]
159+
#![feature(cfg_target_has_atomic_equal_alignment)]
160160
#![feature(const_fn_floating_point_arithmetic)]
161161
#![feature(const_fn_fn_ptr_basics)]
162162
#![feature(const_fn_trait_bound)]

core/src/macros/mod.rs

-19
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,6 @@ macro_rules! writeln {
594594
/// unreachable!("The loop should always return");
595595
/// }
596596
/// ```
597-
#[cfg(not(bootstrap))]
598597
#[macro_export]
599598
#[rustc_builtin_macro(unreachable)]
600599
#[allow_internal_unstable(edition_panic)]
@@ -608,24 +607,6 @@ macro_rules! unreachable {
608607
};
609608
}
610609

611-
/// unreachable!() macro
612-
#[cfg(bootstrap)]
613-
#[macro_export]
614-
#[stable(feature = "rust1", since = "1.0.0")]
615-
#[cfg_attr(not(test), rustc_diagnostic_item = "unreachable_macro")]
616-
#[allow_internal_unstable(core_panic)]
617-
macro_rules! unreachable {
618-
() => ({
619-
$crate::panicking::panic("internal error: entered unreachable code")
620-
});
621-
($msg:expr $(,)?) => ({
622-
$crate::unreachable!("{}", $msg)
623-
});
624-
($fmt:expr, $($arg:tt)*) => ({
625-
$crate::panic!($crate::concat!("internal error: entered unreachable code: ", $fmt), $($arg)*)
626-
});
627-
}
628-
629610
/// Indicates unimplemented code by panicking with a message of "not implemented".
630611
///
631612
/// This allows your code to type-check, which is useful if you are prototyping or

core/src/panicking.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ pub const fn panic_str(expr: &str) -> ! {
5656
panic_display(&expr);
5757
}
5858

59-
#[cfg(not(bootstrap))]
6059
#[inline]
6160
#[track_caller]
6261
#[rustc_diagnostic_item = "unreachable_display"] // needed for `non-fmt-panics` lint
@@ -85,9 +84,11 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
8584
panic!("index out of bounds: the len is {} but the index is {}", len, index)
8685
}
8786

88-
#[cfg(not(bootstrap))]
87+
// This function is called directly by the codegen backend, and must not have
88+
// any extra arguments (including those synthesized by track_caller).
8989
#[cold]
9090
#[inline(never)]
91+
#[cfg_attr(bootstrap, track_caller)]
9192
#[lang = "panic_no_unwind"] // needed by codegen for panic in nounwind function
9293
fn panic_no_unwind() -> ! {
9394
if cfg!(feature = "panic_immediate_abort") {

core/tests/intrinsics.rs

-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ fn test_hints_in_const_contexts() {
8080
}
8181
}
8282

83-
#[cfg(not(bootstrap))]
8483
#[test]
8584
fn test_const_allocate_at_runtime() {
8685
use core::intrinsics::const_allocate;
@@ -89,7 +88,6 @@ fn test_const_allocate_at_runtime() {
8988
}
9089
}
9190

92-
#[cfg(not(bootstrap))]
9391
#[test]
9492
fn test_const_deallocate_at_runtime() {
9593
use core::intrinsics::const_deallocate;

core/tests/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
#![feature(bool_to_option)]
77
#![feature(box_syntax)]
88
#![feature(cell_update)]
9-
#![cfg_attr(bootstrap, feature(cfg_panic))]
10-
#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
119
#![feature(const_assume)]
1210
#![feature(const_black_box)]
1311
#![feature(const_bool_to_option)]

portable-simd/crates/core_simd/src/intrinsics.rs

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ extern "platform-intrinsic" {
4141
pub(crate) fn simd_cast<T, U>(x: T) -> U;
4242
/// follows Rust's `T as U` semantics, including saturating float casts
4343
/// which amounts to the same as `simd_cast` for many cases
44-
#[cfg(not(bootstrap))]
4544
pub(crate) fn simd_as<T, U>(x: T) -> U;
4645

4746
/// neg/fneg

portable-simd/crates/core_simd/src/vector.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ where
6262
/// `from_slice` will panic if the slice's `len` is less than the vector's `Simd::LANES`.
6363
#[must_use]
6464
pub const fn from_slice(slice: &[T]) -> Self {
65-
assert!(
66-
slice.len() >= LANES,
67-
"slice length must be at least the number of lanes"
68-
);
65+
assert!(slice.len() >= LANES, "slice length must be at least the number of lanes");
6966
let mut array = [slice[0]; LANES];
7067
let mut i = 0;
7168
while i < LANES {
@@ -100,7 +97,6 @@ where
10097
/// ```
10198
#[must_use]
10299
#[inline]
103-
#[cfg(not(bootstrap))]
104100
pub fn cast<U: SimdElement>(self) -> Simd<U, LANES> {
105101
unsafe { intrinsics::simd_as(self) }
106102
}

std/src/collections/hash/map.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ impl<K, V, S> HashMap<K, V, S> {
371371
/// assert_eq!(vec, ["a", "b", "c"]);
372372
/// ```
373373
#[inline]
374-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
374+
#[rustc_lint_query_instability]
375375
#[stable(feature = "map_into_keys_values", since = "1.54.0")]
376376
pub fn into_keys(self) -> IntoKeys<K, V> {
377377
IntoKeys { inner: self.into_iter() }
@@ -449,7 +449,7 @@ impl<K, V, S> HashMap<K, V, S> {
449449
/// assert_eq!(vec, [1, 2, 3]);
450450
/// ```
451451
#[inline]
452-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
452+
#[rustc_lint_query_instability]
453453
#[stable(feature = "map_into_keys_values", since = "1.54.0")]
454454
pub fn into_values(self) -> IntoValues<K, V> {
455455
IntoValues { inner: self.into_iter() }
@@ -473,7 +473,7 @@ impl<K, V, S> HashMap<K, V, S> {
473473
/// println!("key: {} val: {}", key, val);
474474
/// }
475475
/// ```
476-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
476+
#[rustc_lint_query_instability]
477477
#[stable(feature = "rust1", since = "1.0.0")]
478478
pub fn iter(&self) -> Iter<'_, K, V> {
479479
Iter { base: self.base.iter() }
@@ -503,7 +503,7 @@ impl<K, V, S> HashMap<K, V, S> {
503503
/// println!("key: {} val: {}", key, val);
504504
/// }
505505
/// ```
506-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
506+
#[rustc_lint_query_instability]
507507
#[stable(feature = "rust1", since = "1.0.0")]
508508
pub fn iter_mut(&mut self) -> IterMut<'_, K, V> {
509509
IterMut { base: self.base.iter_mut() }
@@ -568,7 +568,7 @@ impl<K, V, S> HashMap<K, V, S> {
568568
/// assert!(a.is_empty());
569569
/// ```
570570
#[inline]
571-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
571+
#[rustc_lint_query_instability]
572572
#[stable(feature = "drain", since = "1.6.0")]
573573
pub fn drain(&mut self) -> Drain<'_, K, V> {
574574
Drain { base: self.base.drain() }
@@ -610,7 +610,7 @@ impl<K, V, S> HashMap<K, V, S> {
610610
/// assert_eq!(odds, vec![1, 3, 5, 7]);
611611
/// ```
612612
#[inline]
613-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
613+
#[rustc_lint_query_instability]
614614
#[unstable(feature = "hash_drain_filter", issue = "59618")]
615615
pub fn drain_filter<F>(&mut self, pred: F) -> DrainFilter<'_, K, V, F>
616616
where
@@ -634,7 +634,7 @@ impl<K, V, S> HashMap<K, V, S> {
634634
/// assert_eq!(map.len(), 4);
635635
/// ```
636636
#[inline]
637-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
637+
#[rustc_lint_query_instability]
638638
#[stable(feature = "retain_hash_collection", since = "1.18.0")]
639639
pub fn retain<F>(&mut self, f: F)
640640
where
@@ -2001,7 +2001,7 @@ impl<'a, K, V, S> IntoIterator for &'a HashMap<K, V, S> {
20012001
type IntoIter = Iter<'a, K, V>;
20022002

20032003
#[inline]
2004-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
2004+
#[rustc_lint_query_instability]
20052005
fn into_iter(self) -> Iter<'a, K, V> {
20062006
self.iter()
20072007
}
@@ -2013,7 +2013,7 @@ impl<'a, K, V, S> IntoIterator for &'a mut HashMap<K, V, S> {
20132013
type IntoIter = IterMut<'a, K, V>;
20142014

20152015
#[inline]
2016-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
2016+
#[rustc_lint_query_instability]
20172017
fn into_iter(self) -> IterMut<'a, K, V> {
20182018
self.iter_mut()
20192019
}
@@ -2043,7 +2043,7 @@ impl<K, V, S> IntoIterator for HashMap<K, V, S> {
20432043
/// let vec: Vec<(&str, i32)> = map.into_iter().collect();
20442044
/// ```
20452045
#[inline]
2046-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
2046+
#[rustc_lint_query_instability]
20472047
fn into_iter(self) -> IntoIter<K, V> {
20482048
IntoIter { base: self.base.into_iter() }
20492049
}

std/src/collections/hash/set.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ impl<T, S> HashSet<T, S> {
185185
/// }
186186
/// ```
187187
#[inline]
188-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
188+
#[rustc_lint_query_instability]
189189
#[stable(feature = "rust1", since = "1.0.0")]
190190
pub fn iter(&self) -> Iter<'_, T> {
191191
Iter { base: self.base.iter() }
@@ -250,7 +250,7 @@ impl<T, S> HashSet<T, S> {
250250
/// assert!(set.is_empty());
251251
/// ```
252252
#[inline]
253-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
253+
#[rustc_lint_query_instability]
254254
#[stable(feature = "drain", since = "1.6.0")]
255255
pub fn drain(&mut self) -> Drain<'_, T> {
256256
Drain { base: self.base.drain() }
@@ -289,7 +289,7 @@ impl<T, S> HashSet<T, S> {
289289
/// assert_eq!(odds, vec![1, 3, 5, 7]);
290290
/// ```
291291
#[inline]
292-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
292+
#[rustc_lint_query_instability]
293293
#[unstable(feature = "hash_drain_filter", issue = "59618")]
294294
pub fn drain_filter<F>(&mut self, pred: F) -> DrainFilter<'_, T, F>
295295
where
@@ -312,7 +312,7 @@ impl<T, S> HashSet<T, S> {
312312
/// set.retain(|&k| k % 2 == 0);
313313
/// assert_eq!(set.len(), 3);
314314
/// ```
315-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
315+
#[rustc_lint_query_instability]
316316
#[stable(feature = "retain_hash_collection", since = "1.18.0")]
317317
pub fn retain<F>(&mut self, f: F)
318318
where
@@ -537,7 +537,7 @@ where
537537
/// assert_eq!(diff, [4].iter().collect());
538538
/// ```
539539
#[inline]
540-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
540+
#[rustc_lint_query_instability]
541541
#[stable(feature = "rust1", since = "1.0.0")]
542542
pub fn difference<'a>(&'a self, other: &'a HashSet<T, S>) -> Difference<'a, T, S> {
543543
Difference { iter: self.iter(), other }
@@ -565,7 +565,7 @@ where
565565
/// assert_eq!(diff1, [1, 4].iter().collect());
566566
/// ```
567567
#[inline]
568-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
568+
#[rustc_lint_query_instability]
569569
#[stable(feature = "rust1", since = "1.0.0")]
570570
pub fn symmetric_difference<'a>(
571571
&'a self,
@@ -593,7 +593,7 @@ where
593593
/// assert_eq!(intersection, [2, 3].iter().collect());
594594
/// ```
595595
#[inline]
596-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
596+
#[rustc_lint_query_instability]
597597
#[stable(feature = "rust1", since = "1.0.0")]
598598
pub fn intersection<'a>(&'a self, other: &'a HashSet<T, S>) -> Intersection<'a, T, S> {
599599
if self.len() <= other.len() {
@@ -622,7 +622,7 @@ where
622622
/// assert_eq!(union, [1, 2, 3, 4].iter().collect());
623623
/// ```
624624
#[inline]
625-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
625+
#[rustc_lint_query_instability]
626626
#[stable(feature = "rust1", since = "1.0.0")]
627627
pub fn union<'a>(&'a self, other: &'a HashSet<T, S>) -> Union<'a, T, S> {
628628
if self.len() >= other.len() {
@@ -1423,7 +1423,7 @@ impl<'a, T, S> IntoIterator for &'a HashSet<T, S> {
14231423
type IntoIter = Iter<'a, T>;
14241424

14251425
#[inline]
1426-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
1426+
#[rustc_lint_query_instability]
14271427
fn into_iter(self) -> Iter<'a, T> {
14281428
self.iter()
14291429
}
@@ -1455,7 +1455,7 @@ impl<T, S> IntoIterator for HashSet<T, S> {
14551455
/// }
14561456
/// ```
14571457
#[inline]
1458-
#[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
1458+
#[rustc_lint_query_instability]
14591459
fn into_iter(self) -> IntoIter<T> {
14601460
IntoIter { base: self.base.into_iter() }
14611461
}

std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@
243243
#![feature(c_variadic)]
244244
#![feature(cfg_accessible)]
245245
#![feature(cfg_eval)]
246-
#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
247246
#![feature(cfg_target_thread_local)]
248247
#![feature(char_error_internals)]
249248
#![feature(char_internals)]

0 commit comments

Comments
 (0)