Skip to content

Commit b63ab80

Browse files
pietroalbiniMark-Simulacrum
authored andcommitted
update cfg(bootstrap)
1 parent 5d088ab commit b63ab80

File tree

14 files changed

+9
-38
lines changed

14 files changed

+9
-38
lines changed

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

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

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
}

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

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

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

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

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

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",

library/core/src/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@
150150
#![feature(const_fn_trait_bound)]
151151
#![feature(const_impl_trait)]
152152
#![feature(const_mut_refs)]
153-
#![cfg_attr(bootstrap, feature(const_panic))]
154153
#![feature(const_precise_live_drops)]
155154
#![feature(const_raw_ptr_deref)]
156155
#![feature(const_refs_to_cell)]
@@ -159,7 +158,7 @@
159158
#![feature(doc_notable_trait)]
160159
#![feature(doc_primitive)]
161160
#![feature(exhaustive_patterns)]
162-
#![cfg_attr(not(bootstrap), feature(doc_cfg_hide))]
161+
#![feature(doc_cfg_hide)]
163162
#![feature(extern_types)]
164163
#![feature(fundamental)]
165164
#![feature(if_let_guard)]
@@ -170,7 +169,7 @@
170169
#![feature(llvm_asm)]
171170
#![feature(min_specialization)]
172171
#![feature(mixed_integer_ops)]
173-
#![cfg_attr(not(bootstrap), feature(must_not_suspend))]
172+
#![feature(must_not_suspend)]
174173
#![feature(negative_impls)]
175174
#![feature(never_type)]
176175
#![feature(no_core)]

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"

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
}

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

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

0 commit comments

Comments
 (0)