Skip to content

Commit 0a91606

Browse files
Bump cfg(bootstrap)
1 parent 068e3d9 commit 0a91606

File tree

33 files changed

+38
-69
lines changed

33 files changed

+38
-69
lines changed

compiler/rustc_abi/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![cfg_attr(feature = "nightly", feature(step_trait, rustc_attrs, min_specialization))]
2-
#![cfg_attr(all(not(bootstrap), feature = "nightly"), allow(internal_features))]
2+
#![cfg_attr(feature = "nightly", allow(internal_features))]
33

44
use std::fmt;
55
#[cfg(feature = "nightly")]

compiler/rustc_arena/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#![deny(unsafe_op_in_unsafe_fn)]
2525
#![deny(rustc::untranslatable_diagnostic)]
2626
#![deny(rustc::diagnostic_outside_of_impl)]
27-
#![cfg_attr(not(bootstrap), allow(internal_features))]
27+
#![allow(internal_features)]
2828
#![allow(clippy::mut_from_ref)] // Arena allocators are one of the places where this pattern is fine.
2929

3030
use smallvec::SmallVec;

compiler/rustc_borrowck/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#![feature(trusted_step)]
1212
#![feature(try_blocks)]
1313
#![recursion_limit = "256"]
14-
#![cfg_attr(not(bootstrap), allow(internal_features))]
14+
#![allow(internal_features)]
1515

1616
#[macro_use]
1717
extern crate rustc_middle;

compiler/rustc_data_structures/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#![allow(rustc::potential_query_instability)]
3838
#![deny(rustc::untranslatable_diagnostic)]
3939
#![deny(rustc::diagnostic_outside_of_impl)]
40-
#![cfg_attr(not(bootstrap), allow(internal_features))]
40+
#![allow(internal_features)]
4141
#![deny(unsafe_op_in_unsafe_fn)]
4242

4343
#[macro_use]

compiler/rustc_error_messages/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![feature(type_alias_impl_trait)]
55
#![deny(rustc::untranslatable_diagnostic)]
66
#![deny(rustc::diagnostic_outside_of_impl)]
7-
#![cfg_attr(not(bootstrap), allow(internal_features))]
7+
#![allow(internal_features)]
88

99
#[macro_use]
1010
extern crate tracing;

compiler/rustc_errors/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#![feature(box_patterns)]
1616
#![feature(error_reporter)]
1717
#![allow(incomplete_features)]
18-
#![cfg_attr(not(bootstrap), allow(internal_features))]
18+
#![allow(internal_features)]
1919

2020
#[macro_use]
2121
extern crate rustc_macros;

compiler/rustc_expand/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#![feature(try_blocks)]
1212
#![recursion_limit = "256"]
1313
#![deny(rustc::untranslatable_diagnostic)]
14-
#![cfg_attr(not(bootstrap), allow(internal_features))]
14+
#![allow(internal_features)]
1515

1616
#[macro_use]
1717
extern crate rustc_macros;

compiler/rustc_hir/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#![recursion_limit = "256"]
1414
#![deny(rustc::untranslatable_diagnostic)]
1515
#![deny(rustc::diagnostic_outside_of_impl)]
16-
#![cfg_attr(not(bootstrap), allow(internal_features))]
16+
#![allow(internal_features)]
1717

1818
#[macro_use]
1919
extern crate rustc_macros;

compiler/rustc_index/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
test
1313
)
1414
)]
15-
#![cfg_attr(all(not(bootstrap), feature = "nightly"), allow(internal_features))]
15+
#![cfg_attr(feature = "nightly", allow(internal_features))]
1616

1717
#[cfg(feature = "nightly")]
1818
pub mod bit_set;

compiler/rustc_lint/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#![recursion_limit = "256"]
4141
#![deny(rustc::untranslatable_diagnostic)]
4242
#![deny(rustc::diagnostic_outside_of_impl)]
43-
#![cfg_attr(not(bootstrap), allow(internal_features))]
43+
#![allow(internal_features)]
4444

4545
#[macro_use]
4646
extern crate rustc_middle;

compiler/rustc_macros/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#![allow(rustc::default_hash_types)]
88
#![deny(rustc::untranslatable_diagnostic)]
99
#![deny(rustc::diagnostic_outside_of_impl)]
10-
#![cfg_attr(not(bootstrap), allow(internal_features))]
10+
#![allow(internal_features)]
1111
#![recursion_limit = "128"]
1212

1313
use synstructure::decl_derive;

compiler/rustc_middle/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
#![feature(macro_metavar_expr)]
6464
#![recursion_limit = "512"]
6565
#![allow(rustc::potential_query_instability)]
66-
#![cfg_attr(not(bootstrap), allow(internal_features))]
66+
#![allow(internal_features)]
6767

6868
#[macro_use]
6969
extern crate bitflags;

compiler/rustc_parse/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#![feature(never_type)]
99
#![feature(rustc_attrs)]
1010
#![recursion_limit = "256"]
11-
#![cfg_attr(not(bootstrap), allow(internal_features))]
11+
#![allow(internal_features)]
1212

1313
#[macro_use]
1414
extern crate tracing;

compiler/rustc_query_impl/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#![allow(rustc::potential_query_instability, unused_parens)]
1212
#![deny(rustc::untranslatable_diagnostic)]
1313
#![deny(rustc::diagnostic_outside_of_impl)]
14-
#![cfg_attr(not(bootstrap), allow(internal_features))]
14+
#![allow(internal_features)]
1515

1616
#[macro_use]
1717
extern crate rustc_middle;

compiler/rustc_resolve/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#![recursion_limit = "256"]
1919
#![allow(rustdoc::private_intra_doc_links)]
2020
#![allow(rustc::potential_query_instability)]
21-
#![cfg_attr(not(bootstrap), allow(internal_features))]
21+
#![allow(internal_features)]
2222

2323
#[macro_use]
2424
extern crate tracing;

compiler/rustc_session/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#![allow(rustc::potential_query_instability)]
1111
#![deny(rustc::untranslatable_diagnostic)]
1212
#![deny(rustc::diagnostic_outside_of_impl)]
13-
#![cfg_attr(not(bootstrap), allow(internal_features))]
13+
#![allow(internal_features)]
1414

1515
#[macro_use]
1616
extern crate rustc_macros;

compiler/rustc_span/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#![feature(round_char_boundary)]
2424
#![deny(rustc::untranslatable_diagnostic)]
2525
#![deny(rustc::diagnostic_outside_of_impl)]
26-
#![cfg_attr(not(bootstrap), allow(internal_features))]
26+
#![allow(internal_features)]
2727

2828
#[macro_use]
2929
extern crate rustc_macros;

compiler/rustc_target/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#![feature(step_trait)]
2020
#![deny(rustc::untranslatable_diagnostic)]
2121
#![deny(rustc::diagnostic_outside_of_impl)]
22-
#![cfg_attr(not(bootstrap), allow(internal_features))]
22+
#![allow(internal_features)]
2323

2424
use std::path::{Path, PathBuf};
2525

compiler/rustc_type_ir/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![feature(unwrap_infallible)]
77
#![deny(rustc::untranslatable_diagnostic)]
88
#![deny(rustc::diagnostic_outside_of_impl)]
9-
#![cfg_attr(not(bootstrap), allow(internal_features))]
9+
#![allow(internal_features)]
1010

1111
#[macro_use]
1212
extern crate bitflags;

library/alloc/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@
8888
#![warn(missing_docs)]
8989
#![allow(explicit_outlives_requirements)]
9090
#![warn(multiple_supertrait_upcastable)]
91-
#![cfg_attr(not(bootstrap), allow(internal_features))]
92-
#![cfg_attr(not(bootstrap), allow(rustdoc::redundant_explicit_links))]
91+
#![allow(internal_features)]
92+
#![allow(rustdoc::redundant_explicit_links)]
9393
//
9494
// Library features:
9595
// tidy-alphabetical-start

library/alloc/tests/vec.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2499,7 +2499,6 @@ fn test_into_flattened_size_overflow() {
24992499
let _ = v.into_flattened();
25002500
}
25012501

2502-
#[cfg(not(bootstrap))]
25032502
#[test]
25042503
fn test_box_zero_allocator() {
25052504
use core::{alloc::AllocError, cell::RefCell};

library/core/src/cell.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1893,8 +1893,7 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
18931893
/// on an _exclusive_ `UnsafeCell<T>`. Even though `T` and `UnsafeCell<T>` have the
18941894
/// same memory layout, the following is not allowed and undefined behavior:
18951895
///
1896-
#[cfg_attr(bootstrap, doc = "```rust,no_run")]
1897-
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
1896+
/// ```rust,compile_fail
18981897
/// # use std::cell::UnsafeCell;
18991898
/// unsafe fn not_allowed<T>(ptr: &UnsafeCell<T>) -> &mut T {
19001899
/// let t = ptr as *const UnsafeCell<T> as *mut T;

library/core/src/intrinsics.rs

-16
Original file line numberDiff line numberDiff line change
@@ -2399,7 +2399,6 @@ extern "rust-intrinsic" {
23992399
/// that differs. That allows optimizations that can read in large chunks.
24002400
///
24012401
/// [valid]: crate::ptr#safety
2402-
#[cfg(not(bootstrap))]
24032402
#[rustc_const_unstable(feature = "const_intrinsic_compare_bytes", issue = "none")]
24042403
#[rustc_nounwind]
24052404
pub fn compare_bytes(left: *const u8, right: *const u8, bytes: usize) -> i32;
@@ -2844,18 +2843,3 @@ pub const unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
28442843
write_bytes(dst, val, count)
28452844
}
28462845
}
2847-
2848-
/// Backfill for bootstrap
2849-
#[cfg(bootstrap)]
2850-
pub unsafe fn compare_bytes(left: *const u8, right: *const u8, bytes: usize) -> i32 {
2851-
extern "C" {
2852-
fn memcmp(s1: *const u8, s2: *const u8, n: usize) -> crate::ffi::c_int;
2853-
}
2854-
2855-
if bytes != 0 {
2856-
// SAFETY: Since bytes is non-zero, the caller has met `memcmp`'s requirements.
2857-
unsafe { memcmp(left, right, bytes).into() }
2858-
} else {
2859-
0
2860-
}
2861-
}

library/core/src/intrinsics/mir.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//!
1515
//! ```rust
1616
//! #![feature(core_intrinsics, custom_mir)]
17-
#![cfg_attr(not(bootstrap), doc = "#![allow(internal_features)]")]
17+
//! #![allow(internal_features)]
1818
//!
1919
//! use core::intrinsics::mir::*;
2020
//!
@@ -64,7 +64,7 @@
6464
//!
6565
//! ```rust
6666
//! #![feature(core_intrinsics, custom_mir)]
67-
#![cfg_attr(not(bootstrap), doc = "#![allow(internal_features)]")]
67+
//! #![allow(internal_features)]
6868
//!
6969
//! use core::intrinsics::mir::*;
7070
//!
@@ -318,7 +318,7 @@ define!(
318318
/// # Examples
319319
///
320320
/// ```rust
321-
#[cfg_attr(not(bootstrap), doc = "#![allow(internal_features)]")]
321+
/// #![allow(internal_features)]
322322
/// #![feature(custom_mir, core_intrinsics)]
323323
///
324324
/// use core::intrinsics::mir::*;

library/core/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@
9696
#![allow(explicit_outlives_requirements)]
9797
#![allow(incomplete_features)]
9898
#![warn(multiple_supertrait_upcastable)]
99-
#![cfg_attr(not(bootstrap), allow(internal_features))]
99+
#![allow(internal_features)]
100100
// Do not check link redundancy on bootstraping phase
101-
#![cfg_attr(not(bootstrap), allow(rustdoc::redundant_explicit_links))]
101+
#![allow(rustdoc::redundant_explicit_links)]
102102
//
103103
// Library features:
104104
// tidy-alphabetical-start

library/panic_abort/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#![feature(staged_api)]
1515
#![feature(rustc_attrs)]
1616
#![feature(c_unwind)]
17-
#![cfg_attr(not(bootstrap), allow(internal_features))]
17+
#![allow(internal_features)]
1818

1919
#[cfg(target_os = "android")]
2020
mod android;

library/panic_unwind/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@
1919
#![feature(panic_unwind)]
2020
#![feature(staged_api)]
2121
#![feature(std_internals)]
22-
#![cfg_attr(bootstrap, feature(abi_thiscall))]
2322
#![feature(rustc_attrs)]
2423
#![panic_runtime]
2524
#![feature(panic_runtime)]
2625
#![feature(c_unwind)]
2726
// `real_imp` is unused with Miri, so silence warnings.
2827
#![cfg_attr(miri, allow(dead_code))]
29-
#![cfg_attr(not(bootstrap), allow(internal_features))]
28+
#![allow(internal_features)]
3029

3130
use alloc::boxed::Box;
3231
use core::any::Any;

library/proc_macro/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#![feature(min_specialization)]
3333
#![feature(strict_provenance)]
3434
#![recursion_limit = "256"]
35-
#![cfg_attr(not(bootstrap), allow(internal_features))]
35+
#![allow(internal_features)]
3636

3737
#[unstable(feature = "proc_macro_internals", issue = "27812")]
3838
#[doc(hidden)]

library/profiler_builtins/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
issue = "none"
88
)]
99
#![allow(unused_features)]
10-
#![cfg_attr(not(bootstrap), allow(internal_features))]
10+
#![allow(internal_features)]
1111
#![feature(staged_api)]

library/std/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@
220220
#![warn(missing_debug_implementations)]
221221
#![allow(explicit_outlives_requirements)]
222222
#![allow(unused_lifetimes)]
223-
#![cfg_attr(not(bootstrap), allow(internal_features))]
223+
#![allow(internal_features)]
224224
#![deny(rustc::existing_doc_keyword)]
225225
#![deny(fuzzy_provenance_casts)]
226-
#![cfg_attr(not(bootstrap), allow(rustdoc::redundant_explicit_links))]
226+
#![allow(rustdoc::redundant_explicit_links)]
227227
// Ensure that std can be linked against panic_abort despite compiled with `-C panic=unwind`
228228
#![deny(ffi_unwind_calls)]
229229
// std may use features in a platform-specific way

library/test/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#![feature(process_exitcode_internals)]
2222
#![feature(panic_can_unwind)]
2323
#![feature(test)]
24-
#![cfg_attr(not(bootstrap), allow(internal_features))]
24+
#![allow(internal_features)]
2525

2626
// Public reexports
2727
pub use self::bench::{black_box, Bencher};

library/unwind/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#![feature(c_unwind)]
66
#![feature(cfg_target_abi)]
77
#![cfg_attr(not(target_env = "msvc"), feature(libc))]
8-
#![cfg_attr(not(bootstrap), allow(internal_features))]
8+
#![allow(internal_features)]
99

1010
cfg_if::cfg_if! {
1111
if #[cfg(target_env = "msvc")] {

src/tools/compiletest/src/runtest.rs

+3-15
Original file line numberDiff line numberDiff line change
@@ -2354,14 +2354,7 @@ impl<'test> TestCx<'test> {
23542354
// Hide line numbers to reduce churn
23552355
rustc.arg("-Zui-testing");
23562356
rustc.arg("-Zdeduplicate-diagnostics=no");
2357-
// #[cfg(not(bootstrap)] unconditionally pass flag after beta bump
2358-
// since `ui-fulldeps --stage=1` builds using the stage 0 compiler,
2359-
// which doesn't have this flag.
2360-
if !(self.config.stage_id.starts_with("stage1-")
2361-
&& self.config.suite == "ui-fulldeps")
2362-
{
2363-
rustc.arg("-Zwrite-long-types-to-disk=no");
2364-
}
2357+
rustc.arg("-Zwrite-long-types-to-disk=no");
23652358
// FIXME: use this for other modes too, for perf?
23662359
rustc.arg("-Cstrip=debuginfo");
23672360
}
@@ -2483,13 +2476,8 @@ impl<'test> TestCx<'test> {
24832476
rustc.args(&["-A", "unused"]);
24842477
}
24852478

2486-
// #[cfg(not(bootstrap)] unconditionally pass flag after beta bump
2487-
// since `ui-fulldeps --stage=1` builds using the stage 0 compiler,
2488-
// which doesn't have this lint.
2489-
if !(self.config.stage_id.starts_with("stage1-") && self.config.suite == "ui-fulldeps") {
2490-
// Allow tests to use internal features.
2491-
rustc.args(&["-A", "internal_features"]);
2492-
}
2479+
// Allow tests to use internal features.
2480+
rustc.args(&["-A", "internal_features"]);
24932481

24942482
if self.props.force_host {
24952483
self.maybe_add_external_args(&mut rustc, &self.config.host_rustcflags);

0 commit comments

Comments
 (0)