]> git.lizzy.rs Git - rust.git/commitdiff
Switch bootstrap cfgs
authorMark Rousskov <mark.simulacrum@gmail.com>
Wed, 23 Feb 2022 13:06:22 +0000 (08:06 -0500)
committerMark Rousskov <mark.simulacrum@gmail.com>
Fri, 25 Feb 2022 13:00:52 +0000 (08:00 -0500)
56 files changed:
compiler/rustc_ast_lowering/src/lib.rs
compiler/rustc_ast_passes/src/lib.rs
compiler/rustc_borrowck/src/lib.rs
compiler/rustc_builtin_macros/src/lib.rs
compiler/rustc_codegen_llvm/src/lib.rs
compiler/rustc_codegen_ssa/src/lib.rs
compiler/rustc_const_eval/src/lib.rs
compiler/rustc_data_structures/src/intern.rs
compiler/rustc_data_structures/src/lib.rs
compiler/rustc_driver/src/lib.rs
compiler/rustc_errors/src/lib.rs
compiler/rustc_expand/src/lib.rs
compiler/rustc_incremental/src/lib.rs
compiler/rustc_infer/src/lib.rs
compiler/rustc_interface/src/lib.rs
compiler/rustc_lint/src/context.rs
compiler/rustc_lint/src/lib.rs
compiler/rustc_metadata/src/lib.rs
compiler/rustc_middle/src/lib.rs
compiler/rustc_middle/src/ty/consts.rs
compiler/rustc_middle/src/ty/context.rs
compiler/rustc_middle/src/ty/mod.rs
compiler/rustc_middle/src/ty/sty.rs
compiler/rustc_mir_build/src/lib.rs
compiler/rustc_mir_transform/src/lib.rs
compiler/rustc_monomorphize/src/lib.rs
compiler/rustc_passes/src/lib.rs
compiler/rustc_privacy/src/lib.rs
compiler/rustc_query_impl/src/lib.rs
compiler/rustc_query_system/src/lib.rs
compiler/rustc_resolve/src/lib.rs
compiler/rustc_save_analysis/src/lib.rs
compiler/rustc_session/src/lib.rs
compiler/rustc_span/src/lib.rs
compiler/rustc_span/src/span_encoding.rs
compiler/rustc_symbol_mangling/src/lib.rs
compiler/rustc_trait_selection/src/lib.rs
compiler/rustc_typeck/src/lib.rs
library/alloc/src/lib.rs
library/core/src/intrinsics.rs
library/core/src/lib.rs
library/core/src/macros/mod.rs
library/core/src/panicking.rs
library/core/tests/intrinsics.rs
library/core/tests/lib.rs
library/portable-simd/crates/core_simd/src/intrinsics.rs
library/portable-simd/crates/core_simd/src/vector.rs
library/std/src/collections/hash/map.rs
library/std/src/collections/hash/set.rs
library/std/src/lib.rs
library/test/src/tests.rs
library/test/src/types.rs
src/librustdoc/doctest.rs
src/librustdoc/lib.rs
src/tools/clippy/clippy_lints/src/lib.rs
src/tools/compiletest/src/header.rs

index 0156c5016acd1cd3cc8366de1493b08d9ca593b9..89c027585df308e914edff3b5e1f7e86984a04d2 100644 (file)
@@ -35,7 +35,7 @@
 #![feature(let_else)]
 #![feature(never_type)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 use rustc_ast::token::{self, Token};
 use rustc_ast::tokenstream::{CanSynthesizeMissingTokens, TokenStream, TokenTree};
index f4863137bdd59c947faf0d657928b8e5daa07fe3..876dd7f757c5a8c0f08023fb0fd7b3094547256e 100644 (file)
@@ -8,7 +8,7 @@
 #![feature(box_patterns)]
 #![feature(let_else)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 pub mod ast_validation;
 pub mod feature_gate;
index 590c5799ff6179d34b6889a7bc722b4103095223..c489f409fb53bdd6fcba7a850cf4ff492678b8f6 100644 (file)
@@ -9,7 +9,7 @@
 #![feature(trusted_step)]
 #![feature(try_blocks)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate rustc_middle;
index 38877399943ef77574acfd04697ab2e3d7ddc8ec..a05122394a06a21401aedc423c308a67f4c24171 100644 (file)
@@ -13,7 +13,7 @@
 #![feature(proc_macro_internals)]
 #![feature(proc_macro_quote)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 extern crate proc_macro;
 
index 75836e143856facc4a21b7c7578bef5798a364c1..fa48abdfbc8f62ed602d0a64c192c6c1853c4bfe 100644 (file)
@@ -11,7 +11,7 @@
 #![feature(extern_types)]
 #![feature(nll)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 use back::write::{create_informational_target_machine, create_target_machine};
 
index 9bb8db076a8d67d2bffccd3a218e7465668332de..25e27f565eae26d626d9e45862cb17800a39d96a 100644 (file)
@@ -7,7 +7,7 @@
 #![feature(nll)]
 #![feature(associated_type_bounds)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 //! This crate contains codegen code that is used by all codegen backends (LLVM and others).
 //! The backend-agnostic functions of this crate use functions defined in various traits that
index 77d312f585138f6c4c9eda1031cb4f4c1a27955a..d688331ae0a56f569fac57467846e593a02164b6 100644 (file)
@@ -22,7 +22,7 @@
 #![feature(trusted_step)]
 #![feature(try_blocks)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate tracing;
index c79a5ebf0933bbfba4b73418256b1964f5fb6302..46054fe7bcbb97234dff1580361a490e4a2a0cd7 100644 (file)
@@ -20,7 +20,7 @@ mod private {
 /// but you can only construct a `Interned` with `new_unchecked`, and not
 /// directly.
 #[derive(Debug)]
-#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
+#[rustc_pass_by_value]
 pub struct Interned<'a, T>(pub &'a T, pub private::PrivateZst);
 
 impl<'a, T> Interned<'a, T> {
index 3e93fe9a11f72613a3aa8d21a50ff0394108d049..b1e59d6502913621afd4c6d2b63412d84f5d0118 100644 (file)
@@ -28,7 +28,7 @@
 #![feature(vec_into_raw_parts)]
 #![allow(rustc::default_hash_types)]
 #![deny(unaligned_references)]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate tracing;
index 563ec8b0e3a70fceee51d8eabca767c1653b6d57..db03ee8c4bc9400aad33303c908dab61d38623bf 100644 (file)
@@ -9,7 +9,7 @@
 #![feature(let_else)]
 #![feature(once_cell)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate tracing;
index 463308c27b25a92e62d9fbe3b951fab1970f41e6..fdfedffc529851bc15585eea5b583fde93f24145 100644 (file)
@@ -8,9 +8,9 @@
 #![feature(if_let_guard)]
 #![feature(let_else)]
 #![feature(nll)]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
 #![feature(adt_const_params)]
 #![allow(incomplete_features)]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate rustc_macros;
index 43a310f4eafe3f4442149812ac93ce133e05f876..b024524aa2968e730187350070b5ea3783d175e3 100644 (file)
@@ -9,7 +9,7 @@
 #![feature(proc_macro_span)]
 #![feature(try_blocks)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate rustc_macros;
index b4df3e1e396bdf2c4b5f4af70f665277cea8bba6..017113459664778040761f528a5dbc395a5dc8c7 100644 (file)
@@ -5,7 +5,7 @@
 #![feature(let_else)]
 #![feature(nll)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate rustc_middle;
index ae79e14db181c94e0bd061482455112f6a15ded0..4960630051f3ee2c8fd8b2675c7c89df535636eb 100644 (file)
@@ -23,7 +23,7 @@
 #![feature(min_specialization)]
 #![feature(label_break_value)]
 #![recursion_limit = "512"] // For rustdoc
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate rustc_macros;
index dcad3036cc24d3af834d54eb4d927a89a63b0aa8..f847c08a9dc7b5e362e981aca8aee7843f9d9230 100644 (file)
@@ -6,7 +6,7 @@
 #![feature(nll)]
 #![feature(once_cell)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 mod callbacks;
 pub mod interface;
index ac0f4bd8a4d72fd0dac92c5246706ba137e911cf..0582a4e01bfeb5b7e87ddffb72b9d87a9d718368 100644 (file)
@@ -147,7 +147,7 @@ pub fn get_lint_groups<'t>(
         &'t self,
     ) -> impl Iterator<Item = (&'static str, Vec<LintId>, bool)> + 't {
         // This function is not used in a way which observes the order of lints.
-        #[cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+        #[allow(rustc::potential_query_instability)]
         self.lint_groups
             .iter()
             .filter(|(_, LintGroup { depr, .. })| {
index 7182022d2529817d5f7bf9163e3d21289adccb6a..a40453eb22a7a946b99f14e34ea127b7d94e5717 100644 (file)
@@ -38,7 +38,7 @@
 #![feature(nll)]
 #![feature(control_flow_enum)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate rustc_middle;
index 046245080deb555423c13acbb062dd1c94f63e49..06658aadbac2710234fde1764d916b96dc5c69cb 100644 (file)
@@ -9,7 +9,7 @@
 #![feature(try_blocks)]
 #![feature(never_type)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 extern crate proc_macro;
 
index d3de54b4950f6a4e6707e0dedcbbb0cf6f5b4b0b..7ca564f29e6591a6b07901874d88d7fcfe4c9de0 100644 (file)
@@ -57,7 +57,7 @@
 #![feature(unwrap_infallible)]
 #![feature(decl_macro)]
 #![recursion_limit = "512"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate bitflags;
index a794a8c0e0874f3c5c0b4e8b7a340a2509e72782..b753c6238e147de4da3e59feb5f5a5d578ee4845 100644 (file)
@@ -21,7 +21,7 @@
 
 /// Use this rather than `ConstS`, whenever possible.
 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HashStable)]
-#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
+#[rustc_pass_by_value]
 pub struct Const<'tcx>(pub Interned<'tcx, ConstS<'tcx>>);
 
 impl<'tcx> fmt::Debug for Const<'tcx> {
index 7a6a6a00cc755af52ca897bc2c9beb765684a952..19d8856dc6ce4081119b9783322f043cd6cee3f0 100644 (file)
@@ -970,7 +970,7 @@ pub struct FreeRegionInfo {
 /// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/ty.html
 #[derive(Copy, Clone)]
 #[rustc_diagnostic_item = "TyCtxt"]
-#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
+#[rustc_pass_by_value]
 pub struct TyCtxt<'tcx> {
     gcx: &'tcx GlobalCtxt<'tcx>,
 }
index f0b7f2a653f45e761b1e7cca71c1af64d99f0139..88c993d98e2423b17aba154aa4892588c45cfa15 100644 (file)
@@ -433,7 +433,7 @@ pub struct CReaderCacheKey {
 /// Use this rather than `TyS`, whenever possible.
 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
 #[rustc_diagnostic_item = "Ty"]
-#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
+#[rustc_pass_by_value]
 pub struct Ty<'tcx>(Interned<'tcx, TyS<'tcx>>);
 
 // Statics only used for internal testing.
@@ -486,7 +486,7 @@ pub fn has_name(&self) -> bool {
 
 /// Use this rather than `PredicateS`, whenever possible.
 #[derive(Clone, Copy, PartialEq, Eq, Hash)]
-#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
+#[rustc_pass_by_value]
 pub struct Predicate<'tcx>(Interned<'tcx, PredicateS<'tcx>>);
 
 impl<'tcx> Predicate<'tcx> {
index 02a4df637d88946b25ac850550ca5d0bafeb44c4..a1e906140e0e8211a8f5620f9b05029e1523d0d4 100644 (file)
@@ -1396,7 +1396,7 @@ pub fn for_def(def: &ty::GenericParamDef) -> ParamConst {
 
 /// Use this rather than `TyKind`, whenever possible.
 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HashStable)]
-#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
+#[rustc_pass_by_value]
 pub struct Region<'tcx>(pub Interned<'tcx, RegionKind>);
 
 impl<'tcx> Deref for Region<'tcx> {
index 12ea740d48aec56bbc4c90430d699180269f4f8a..9dea67e176266bdcebe673eaa5118a607268a752 100644 (file)
@@ -9,7 +9,7 @@
 #![feature(once_cell)]
 #![feature(min_specialization)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate tracing;
index e7d5bab8fd9d45e6bce054f0d7c75e8f4e754ee8..c0c66daffa8e0b56e1ace951721f2df0de0907a5 100644 (file)
@@ -10,7 +10,7 @@
 #![feature(trusted_step)]
 #![feature(try_blocks)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate tracing;
index bbc65b09ece1dbd34359af691ffaea0fcc388ad3..c9accbcd86ed4315f18967efc17cf980b06ab802 100644 (file)
@@ -4,7 +4,7 @@
 #![feature(control_flow_enum)]
 #![feature(let_else)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate tracing;
index 3130513c40e3774e602c4dbb7d51539b27e9dff7..71381f1d869311d964fa440550581c273d66c313 100644 (file)
@@ -13,7 +13,7 @@
 #![feature(nll)]
 #![feature(try_blocks)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate rustc_middle;
index 3dd9995fa0081e7dc1d320db14d7aa7f27778d69..b56cb86a18c86f30cd2697d4b0ffbae32c57e6be 100644 (file)
@@ -4,7 +4,7 @@
 #![feature(try_blocks)]
 #![feature(associated_type_defaults)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 use rustc_ast::MacroDef;
 use rustc_attr as attr;
index 832540a85e74b9ab2135ba967e684f3fff5c304d..6ebff5388f457d4d2a35f6cb50b2a2a00f7c661e 100644 (file)
@@ -7,7 +7,7 @@
 #![feature(once_cell)]
 #![feature(rustc_attrs)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate rustc_macros;
index 750ac76a771222d130c830997419fda760abeb5c..6b70e9342fa648f77ef667cb040f850a2cad21f8 100644 (file)
@@ -5,7 +5,7 @@
 #![feature(let_else)]
 #![feature(min_specialization)]
 #![feature(extern_types)]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate tracing;
index 4823b889207f145e42626716e89285bb879c5a6d..0c386ebc49eaa16c24e0d801cc741012ec29f197 100644 (file)
@@ -18,7 +18,7 @@
 #![feature(nll)]
 #![recursion_limit = "256"]
 #![allow(rustdoc::private_intra_doc_links)]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate tracing;
index 43ec35a8434194f9e54c93ed598ef18c912133f1..cf71f9b3fc5aaa9076c3e016d8e4cf9cd5f0de38 100644 (file)
@@ -3,7 +3,7 @@
 #![feature(nll)]
 #![feature(let_else)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 mod dump_visitor;
 mod dumper;
index 82a95faa3470a87bf173f98bbcd34906e7a65532..f9574cb1a3bb57238d9e7f930d8f0810876cc804 100644 (file)
@@ -4,7 +4,7 @@
 #![feature(min_specialization)]
 #![feature(once_cell)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate rustc_macros;
index e51030eedf82fa6cb74f70f960d1b4e9c1685f6c..9d4c2e3bb84a3d7c133d896b404beba581db4523 100644 (file)
@@ -22,7 +22,7 @@
 #![feature(negative_impls)]
 #![feature(nll)]
 #![feature(min_specialization)]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate rustc_macros;
index 61e4074a7c80bf1cf9d846df96bccb2a9f91000c..cd382d6c956cad8d51e90c748c8a4933c22910e0 100644 (file)
 /// using the callback `SPAN_TRACK` to access the query engine.
 ///
 #[derive(Clone, Copy, Eq, PartialEq, Hash)]
-// FIXME(@lcnr): Enable this attribute once the bootstrap
-// compiler knows of `rustc_pass_by_value`.
-//
-// Right now, this lint would only trigger when compiling the
-// stage 2 compiler, which is fairly annoying as there are
-// a lot of places using `&Span` right now. After the next bootstrap bump,
-// the lint will already trigger when using stage 1, which is a lot less annoying.
-//
-// #[cfg_attr(not(bootstrap), rustc_pass_by_value)]
+// FIXME: Enable this in the bootstrap bump, but separate commit.
+// #[rustc_pass_by_value]
 pub struct Span {
     base_or_index: u32,
     len_or_tag: u16,
index f4d1f41902aff11802bb176b86720073c33822b1..3b60f91f8c85394049e597e06f9b75eca90fe194 100644 (file)
@@ -91,7 +91,7 @@
 #![feature(never_type)]
 #![feature(nll)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate rustc_middle;
index 0041f5964059c9f646b57715b021800cccd96503..5569334ff3d20c48bdb3c12da9bac3335de4101c 100644 (file)
@@ -22,7 +22,7 @@
 #![feature(crate_visibility_modifier)]
 #![feature(control_flow_enum)]
 #![recursion_limit = "512"] // For rustdoc
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate rustc_macros;
index d415e37ff0116435c67d6a0acf30a6c5d762c9d1..40904c1dfd63965ffbde0d85ac24dfe7c2528274 100644 (file)
@@ -69,7 +69,7 @@
 #![feature(control_flow_enum)]
 #![feature(hash_drain_filter)]
 #![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate tracing;
index 6da32df57efb761c654afbb068a99b8842de9883..82493f9c398cb5805d7653cab651b6b19b570538 100644 (file)
 #![feature(associated_type_bounds)]
 #![feature(box_syntax)]
 #![feature(cfg_sanitize)]
-#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
 #![feature(const_deref)]
 #![feature(const_fn_trait_bound)]
 #![feature(const_mut_refs)]
index b5228397f0a9990f10cd245c838c307dec120cfe..1d457c2b7d542b080fb6c2f578a9c4b898d82f5e 100644 (file)
@@ -1936,7 +1936,6 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
     /// - If the `ptr` is created in an another const, this intrinsic doesn't deallocate it.
     /// - If the `ptr` is pointing to a local variable, this intrinsic doesn't deallocate it.
     #[rustc_const_unstable(feature = "const_heap", issue = "79597")]
-    #[cfg(not(bootstrap))]
     pub fn const_deallocate(ptr: *mut u8, size: usize, align: usize);
 
     /// Determines whether the raw bytes of the two values are equal.
index aa1ad9362a90e897b4fee9c84dc74cdcbeb32ff5..e7896b2cb66ed0b59d503b933948a023d04de276 100644 (file)
 #![feature(associated_type_bounds)]
 #![feature(auto_traits)]
 #![feature(cfg_target_has_atomic)]
-#![cfg_attr(not(bootstrap), feature(cfg_target_has_atomic_equal_alignment))]
+#![feature(cfg_target_has_atomic_equal_alignment)]
 #![feature(const_fn_floating_point_arithmetic)]
 #![feature(const_fn_fn_ptr_basics)]
 #![feature(const_fn_trait_bound)]
index 628b679236e1d4d879df4e906fcb79cbb5cb13d2..65a2c3ff6edc9ea6bf0ad4df9a22ee779507ac3a 100644 (file)
@@ -594,7 +594,6 @@ macro_rules! writeln {
 ///     unreachable!("The loop should always return");
 /// }
 /// ```
-#[cfg(not(bootstrap))]
 #[macro_export]
 #[rustc_builtin_macro(unreachable)]
 #[allow_internal_unstable(edition_panic)]
@@ -608,24 +607,6 @@ macro_rules! unreachable {
     };
 }
 
-/// unreachable!() macro
-#[cfg(bootstrap)]
-#[macro_export]
-#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg_attr(not(test), rustc_diagnostic_item = "unreachable_macro")]
-#[allow_internal_unstable(core_panic)]
-macro_rules! unreachable {
-    () => ({
-        $crate::panicking::panic("internal error: entered unreachable code")
-    });
-    ($msg:expr $(,)?) => ({
-        $crate::unreachable!("{}", $msg)
-    });
-    ($fmt:expr, $($arg:tt)*) => ({
-        $crate::panic!($crate::concat!("internal error: entered unreachable code: ", $fmt), $($arg)*)
-    });
-}
-
 /// Indicates unimplemented code by panicking with a message of "not implemented".
 ///
 /// This allows your code to type-check, which is useful if you are prototyping or
index 2b720fc4192a7e04ee212a1961635ebba41f79dd..91458a4ca2a030346c44b8b93207f34a91dc7046 100644 (file)
@@ -56,7 +56,6 @@ pub const fn panic_str(expr: &str) -> ! {
     panic_display(&expr);
 }
 
-#[cfg(not(bootstrap))]
 #[inline]
 #[track_caller]
 #[rustc_diagnostic_item = "unreachable_display"] // needed for `non-fmt-panics` lint
@@ -85,7 +84,6 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
     panic!("index out of bounds: the len is {} but the index is {}", len, index)
 }
 
-#[cfg(not(bootstrap))]
 #[cold]
 #[inline(never)]
 #[lang = "panic_no_unwind"] // needed by codegen for panic in nounwind function
index e050e8103752283c4d773f57fd752ddc4b286fb7..06870c6d06cbe9333d79f7330c36089299b668e2 100644 (file)
@@ -80,7 +80,6 @@ fn test_hints_in_const_contexts() {
     }
 }
 
-#[cfg(not(bootstrap))]
 #[test]
 fn test_const_allocate_at_runtime() {
     use core::intrinsics::const_allocate;
@@ -89,7 +88,6 @@ fn test_const_allocate_at_runtime() {
     }
 }
 
-#[cfg(not(bootstrap))]
 #[test]
 fn test_const_deallocate_at_runtime() {
     use core::intrinsics::const_deallocate;
index 06c7be054a0381b0eaa9574efba3277999d4fe46..28830222c1a94b0f31153f8d1a47a1af8e8f6f84 100644 (file)
@@ -6,8 +6,6 @@
 #![feature(bool_to_option)]
 #![feature(box_syntax)]
 #![feature(cell_update)]
-#![cfg_attr(bootstrap, feature(cfg_panic))]
-#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
 #![feature(const_assume)]
 #![feature(const_black_box)]
 #![feature(const_bool_to_option)]
index 233657202f7e8def0053c03a12e4775ba98332b1..2291400537c9431fa0d292e0b43bb95c4ea4e52f 100644 (file)
@@ -41,7 +41,6 @@
     pub(crate) fn simd_cast<T, U>(x: T) -> U;
     /// follows Rust's `T as U` semantics, including saturating float casts
     /// which amounts to the same as `simd_cast` for many cases
-    #[cfg(not(bootstrap))]
     pub(crate) fn simd_as<T, U>(x: T) -> U;
 
     /// neg/fneg
index b7ef7a56c7319b6404d1464149a7c68e28d3ba83..35c5b6b84f81fec784faa0d32483fc5f199f16a9 100644 (file)
@@ -62,10 +62,7 @@ pub const fn splat(value: T) -> Self {
     /// `from_slice` will panic if the slice's `len` is less than the vector's `Simd::LANES`.
     #[must_use]
     pub const fn from_slice(slice: &[T]) -> Self {
-        assert!(
-            slice.len() >= LANES,
-            "slice length must be at least the number of lanes"
-        );
+        assert!(slice.len() >= LANES, "slice length must be at least the number of lanes");
         let mut array = [slice[0]; LANES];
         let mut i = 0;
         while i < LANES {
@@ -100,7 +97,6 @@ pub const fn from_slice(slice: &[T]) -> Self {
     /// ```
     #[must_use]
     #[inline]
-    #[cfg(not(bootstrap))]
     pub fn cast<U: SimdElement>(self) -> Simd<U, LANES> {
         unsafe { intrinsics::simd_as(self) }
     }
index 53b43455b5a61804b25acf527ba6d4c3e22fc4cb..c0524352193f947b45367a3470d5aa1557afe91f 100644 (file)
@@ -371,7 +371,7 @@ pub fn keys(&self) -> Keys<'_, K, V> {
     /// assert_eq!(vec, ["a", "b", "c"]);
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[stable(feature = "map_into_keys_values", since = "1.54.0")]
     pub fn into_keys(self) -> IntoKeys<K, V> {
         IntoKeys { inner: self.into_iter() }
@@ -449,7 +449,7 @@ pub fn values_mut(&mut self) -> ValuesMut<'_, K, V> {
     /// assert_eq!(vec, [1, 2, 3]);
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[stable(feature = "map_into_keys_values", since = "1.54.0")]
     pub fn into_values(self) -> IntoValues<K, V> {
         IntoValues { inner: self.into_iter() }
@@ -473,7 +473,7 @@ pub fn into_values(self) -> IntoValues<K, V> {
     ///     println!("key: {} val: {}", key, val);
     /// }
     /// ```
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn iter(&self) -> Iter<'_, K, V> {
         Iter { base: self.base.iter() }
@@ -503,7 +503,7 @@ pub fn iter(&self) -> Iter<'_, K, V> {
     ///     println!("key: {} val: {}", key, val);
     /// }
     /// ```
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn iter_mut(&mut self) -> IterMut<'_, K, V> {
         IterMut { base: self.base.iter_mut() }
@@ -568,7 +568,7 @@ pub fn is_empty(&self) -> bool {
     /// assert!(a.is_empty());
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[stable(feature = "drain", since = "1.6.0")]
     pub fn drain(&mut self) -> Drain<'_, K, V> {
         Drain { base: self.base.drain() }
@@ -610,7 +610,7 @@ pub fn drain(&mut self) -> Drain<'_, K, V> {
     /// assert_eq!(odds, vec![1, 3, 5, 7]);
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[unstable(feature = "hash_drain_filter", issue = "59618")]
     pub fn drain_filter<F>(&mut self, pred: F) -> DrainFilter<'_, K, V, F>
     where
@@ -634,7 +634,7 @@ pub fn drain_filter<F>(&mut self, pred: F) -> DrainFilter<'_, K, V, F>
     /// assert_eq!(map.len(), 4);
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[stable(feature = "retain_hash_collection", since = "1.18.0")]
     pub fn retain<F>(&mut self, f: F)
     where
@@ -2001,7 +2001,7 @@ impl<'a, K, V, S> IntoIterator for &'a HashMap<K, V, S> {
     type IntoIter = Iter<'a, K, V>;
 
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     fn into_iter(self) -> Iter<'a, K, V> {
         self.iter()
     }
@@ -2013,7 +2013,7 @@ impl<'a, K, V, S> IntoIterator for &'a mut HashMap<K, V, S> {
     type IntoIter = IterMut<'a, K, V>;
 
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     fn into_iter(self) -> IterMut<'a, K, V> {
         self.iter_mut()
     }
@@ -2043,7 +2043,7 @@ impl<K, V, S> IntoIterator for HashMap<K, V, S> {
     /// let vec: Vec<(&str, i32)> = map.into_iter().collect();
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     fn into_iter(self) -> IntoIter<K, V> {
         IntoIter { base: self.base.into_iter() }
     }
index 200667ae390697c390bc9f466c5933035eb4baff..2eb4cacabb83100c3bf4d00ecc4d356b995042ee 100644 (file)
@@ -185,7 +185,7 @@ pub fn capacity(&self) -> usize {
     /// }
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn iter(&self) -> Iter<'_, T> {
         Iter { base: self.base.iter() }
@@ -250,7 +250,7 @@ pub fn is_empty(&self) -> bool {
     /// assert!(set.is_empty());
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[stable(feature = "drain", since = "1.6.0")]
     pub fn drain(&mut self) -> Drain<'_, T> {
         Drain { base: self.base.drain() }
@@ -289,7 +289,7 @@ pub fn drain(&mut self) -> Drain<'_, T> {
     /// assert_eq!(odds, vec![1, 3, 5, 7]);
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[unstable(feature = "hash_drain_filter", issue = "59618")]
     pub fn drain_filter<F>(&mut self, pred: F) -> DrainFilter<'_, T, F>
     where
@@ -312,7 +312,7 @@ pub fn drain_filter<F>(&mut self, pred: F) -> DrainFilter<'_, T, F>
     /// set.retain(|&k| k % 2 == 0);
     /// assert_eq!(set.len(), 3);
     /// ```
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[stable(feature = "retain_hash_collection", since = "1.18.0")]
     pub fn retain<F>(&mut self, f: F)
     where
@@ -537,7 +537,7 @@ pub fn shrink_to(&mut self, min_capacity: usize) {
     /// assert_eq!(diff, [4].iter().collect());
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn difference<'a>(&'a self, other: &'a HashSet<T, S>) -> Difference<'a, T, S> {
         Difference { iter: self.iter(), other }
@@ -565,7 +565,7 @@ pub fn difference<'a>(&'a self, other: &'a HashSet<T, S>) -> Difference<'a, T, S
     /// assert_eq!(diff1, [1, 4].iter().collect());
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn symmetric_difference<'a>(
         &'a self,
@@ -593,7 +593,7 @@ pub fn symmetric_difference<'a>(
     /// assert_eq!(intersection, [2, 3].iter().collect());
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn intersection<'a>(&'a self, other: &'a HashSet<T, S>) -> Intersection<'a, T, S> {
         if self.len() <= other.len() {
@@ -622,7 +622,7 @@ pub fn intersection<'a>(&'a self, other: &'a HashSet<T, S>) -> Intersection<'a,
     /// assert_eq!(union, [1, 2, 3, 4].iter().collect());
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn union<'a>(&'a self, other: &'a HashSet<T, S>) -> Union<'a, T, S> {
         if self.len() >= other.len() {
@@ -1423,7 +1423,7 @@ impl<'a, T, S> IntoIterator for &'a HashSet<T, S> {
     type IntoIter = Iter<'a, T>;
 
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     fn into_iter(self) -> Iter<'a, T> {
         self.iter()
     }
@@ -1455,7 +1455,7 @@ impl<T, S> IntoIterator for HashSet<T, S> {
     /// }
     /// ```
     #[inline]
-    #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+    #[rustc_lint_query_instability]
     fn into_iter(self) -> IntoIter<T> {
         IntoIter { base: self.base.into_iter() }
     }
index 5dc586d3a2adf61ab1fc87f01cb7c26d598064d4..1e0d9b79b9f6e453b089dd58c96e369035b52419 100644 (file)
 #![feature(c_variadic)]
 #![feature(cfg_accessible)]
 #![feature(cfg_eval)]
-#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
 #![feature(cfg_target_thread_local)]
 #![feature(char_error_internals)]
 #![feature(char_internals)]
index e99089e453e7fa131d485c30d8bb49f9218b1a9f..8329e9735d43dff78b1a282402f8bc5320954cfa 100644 (file)
@@ -67,8 +67,6 @@ fn one_ignored_one_unignored_test() -> Vec<TestDescAndFn> {
                 compile_fail: false,
                 no_run: false,
                 test_type: TestType::Unknown,
-                #[cfg(bootstrap)]
-                allow_fail: false,
             },
             testfn: DynTestFn(Box::new(move || {})),
         },
@@ -82,8 +80,6 @@ fn one_ignored_one_unignored_test() -> Vec<TestDescAndFn> {
                 compile_fail: false,
                 no_run: false,
                 test_type: TestType::Unknown,
-                #[cfg(bootstrap)]
-                allow_fail: false,
             },
             testfn: DynTestFn(Box::new(move || {})),
         },
@@ -105,8 +101,6 @@ fn f() {
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -129,8 +123,6 @@ fn f() {}
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -157,8 +149,6 @@ fn f() {
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -185,8 +175,6 @@ fn f() {
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -218,8 +206,6 @@ fn f() {
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -255,8 +241,6 @@ fn f() {
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -284,8 +268,6 @@ fn f() {}
                 compile_fail: false,
                 no_run: false,
                 test_type: TestType::Unknown,
-                #[cfg(bootstrap)]
-                allow_fail: false,
             },
             testfn: DynTestFn(Box::new(f)),
         };
@@ -321,8 +303,6 @@ fn f() {}
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -359,8 +339,6 @@ fn f() {}
             compile_fail: false,
             no_run: false,
             test_type,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -401,8 +379,6 @@ fn typed_test_desc(test_type: TestType) -> TestDesc {
         compile_fail: false,
         no_run: false,
         test_type,
-        #[cfg(bootstrap)]
-        allow_fail: false,
     }
 }
 
@@ -516,8 +492,6 @@ pub fn exclude_should_panic_option() {
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(move || {})),
     });
@@ -543,8 +517,6 @@ fn tests() -> Vec<TestDescAndFn> {
                     compile_fail: false,
                     no_run: false,
                     test_type: TestType::Unknown,
-                    #[cfg(bootstrap)]
-                    allow_fail: false,
                 },
                 testfn: DynTestFn(Box::new(move || {})),
             })
@@ -635,8 +607,6 @@ fn testfn() {}
                 compile_fail: false,
                 no_run: false,
                 test_type: TestType::Unknown,
-                #[cfg(bootstrap)]
-                allow_fail: false,
             },
             testfn: DynTestFn(Box::new(testfn)),
         };
@@ -789,8 +759,6 @@ fn f(_: &mut Bencher) {}
         compile_fail: false,
         no_run: false,
         test_type: TestType::Unknown,
-        #[cfg(bootstrap)]
-        allow_fail: false,
     };
 
     crate::bench::benchmark(TestId(0), desc, tx, true, f);
@@ -814,8 +782,6 @@ fn f(b: &mut Bencher) {
         compile_fail: false,
         no_run: false,
         test_type: TestType::Unknown,
-        #[cfg(bootstrap)]
-        allow_fail: false,
     };
 
     crate::bench::benchmark(TestId(0), desc, tx, true, f);
@@ -833,8 +799,6 @@ fn should_sort_failures_before_printing_them() {
         compile_fail: false,
         no_run: false,
         test_type: TestType::Unknown,
-        #[cfg(bootstrap)]
-        allow_fail: false,
     };
 
     let test_b = TestDesc {
@@ -846,8 +810,6 @@ fn should_sort_failures_before_printing_them() {
         compile_fail: false,
         no_run: false,
         test_type: TestType::Unknown,
-        #[cfg(bootstrap)]
-        allow_fail: false,
     };
 
     let mut out = PrettyFormatter::new(OutputLocation::Raw(Vec::new()), false, 10, false, None);
index cc75220aa003217c9a9ed51c0c2215215687f6be..1084fb98389fb08c8f74fe6e85765a652f32063f 100644 (file)
@@ -123,8 +123,6 @@ pub struct TestDesc {
     pub compile_fail: bool,
     pub no_run: bool,
     pub test_type: TestType,
-    #[cfg(bootstrap)]
-    pub allow_fail: bool,
 }
 
 impl TestDesc {
index dc9ce052cb5eece54aac61c451e5acc1925cf94e..eabf10eda97e538c5e31365d1b308e0675747aa6 100644 (file)
@@ -953,8 +953,6 @@ fn add_test(&mut self, test: String, config: LangString, line: usize) {
                 compile_fail: config.compile_fail,
                 no_run,
                 test_type: test::TestType::DocTest,
-                #[cfg(bootstrap)]
-                allow_fail: false,
             },
             testfn: test::DynTestFn(box move || {
                 let report_unused_externs = |uext| {
index 9d3e58a3a66fc7ca5300f697da42016982d381fb..f4cb935246423dc0db4cd40b505736f1fd09c576 100644 (file)
@@ -22,6 +22,7 @@
 #![recursion_limit = "256"]
 #![warn(rustc::internal)]
 #![allow(clippy::collapsible_if, clippy::collapsible_else_if)]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate tracing;
index 5c45012ef0686c12bc2e9b5bdbb38bab033b7184..85256ff0e995fa247c5ab0622371fce176a366c2 100644 (file)
@@ -18,7 +18,7 @@
 // warn on rustc internal lints
 #![warn(rustc::internal)]
 // Disable this rustc lint for now, as it was also done in rustc
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 // FIXME: switch to something more ergonomic here, once available.
 // (Currently there is no way to opt into sysroot crates without `extern crate`.)
index 2c2239f2b83d19ccf3521a018de2a6d1c5063267..1bdea33dffaf9ebb0bb9a06a5e14b19840d0c751 100644 (file)
@@ -885,8 +885,6 @@ pub fn make_test_description<R: Read>(
         compile_fail: false,
         no_run: false,
         test_type: test::TestType::Unknown,
-        #[cfg(bootstrap)]
-        allow_fail: false,
     }
 }