Switch bootstrap cfgs

This commit is contained in:
Mark Rousskov 2022-02-23 08:06:22 -05:00
parent ea65f50c52
commit 22c3a71de1
56 changed files with 64 additions and 147 deletions

View 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};

View 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;

View 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;

View 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;

View 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};

View 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

View File

@ -22,7 +22,7 @@ Rust MIR: a lowered representation of Rust.
#![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;

View 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> {

View 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;

View 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;

View 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;

View 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;

View 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;

View 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;

View 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;

View File

@ -147,7 +147,7 @@ impl LintStore {
&'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, .. })| {

View 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;

View 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;

View 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;

View File

@ -21,7 +21,7 @@ pub use valtree::*;
/// 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> {

View 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>,
}

View File

@ -433,7 +433,7 @@ static_assert_size!(TyS<'_>, 40);
/// 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 @@ static_assert_size!(PredicateS<'_>, 56);
/// 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> {

View File

@ -1396,7 +1396,7 @@ impl 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> {

View 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;

View 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;

View 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;

View 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;

View 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;

View 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;

View 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;

View 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;

View 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;

View 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;

View 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;

View File

@ -61,15 +61,8 @@ use rustc_data_structures::fx::FxIndexSet;
/// 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,

View 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;

View 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;

View File

@ -69,7 +69,7 @@ This API is completely unstable and subject to change.
#![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;

View File

@ -139,7 +139,6 @@
#![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)]

View File

@ -1936,7 +1936,6 @@ extern "rust-intrinsic" {
/// - 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.

View File

@ -156,7 +156,7 @@
#![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)]

View 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

View 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

View 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;

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

View File

@ -41,7 +41,6 @@ extern "platform-intrinsic" {
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

View File

@ -62,10 +62,7 @@ where
/// `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 @@ where
/// ```
#[must_use]
#[inline]
#[cfg(not(bootstrap))]
pub fn cast<U: SimdElement>(self) -> Simd<U, LANES> {
unsafe { intrinsics::simd_as(self) }
}

View File

@ -371,7 +371,7 @@ impl<K, V, S> HashMap<K, V, S> {
/// 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 @@ impl<K, V, S> HashMap<K, V, S> {
/// 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 @@ impl<K, V, S> HashMap<K, V, S> {
/// 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 @@ impl<K, V, S> HashMap<K, V, S> {
/// 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 @@ impl<K, V, S> HashMap<K, V, S> {
/// 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 @@ impl<K, V, S> HashMap<K, V, S> {
/// 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 @@ impl<K, V, S> HashMap<K, V, S> {
/// 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() }
}

View File

@ -185,7 +185,7 @@ impl<T, S> HashSet<T, S> {
/// }
/// ```
#[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 @@ impl<T, S> HashSet<T, S> {
/// 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 @@ impl<T, S> HashSet<T, S> {
/// 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 @@ impl<T, S> HashSet<T, S> {
/// 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 @@ where
/// 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 @@ where
/// 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 @@ where
/// 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 @@ where
/// 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() }
}

View File

@ -243,7 +243,6 @@
#![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)]

View 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 @@ pub fn do_not_run_ignored_tests() {
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
#[cfg(bootstrap)]
allow_fail: false,
},
testfn: DynTestFn(Box::new(f)),
};
@ -129,8 +123,6 @@ pub fn ignored_tests_result_in_ignored() {
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 test_should_panic() {
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 test_should_panic_good_message() {
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 test_should_panic_bad_message() {
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 test_should_panic_non_string_message_type() {
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 test_should_panic_but_succeeds() {
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 report_time_test_template(report_time: bool) -> Option<TestExecTime> {
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 time_test_failure_template(test_type: TestType) -> TestResult {
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 @@ pub fn exact_filter_match() {
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 sample_tests() -> Vec<TestDescAndFn> {
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
#[cfg(bootstrap)]
allow_fail: false,
},
testfn: DynTestFn(Box::new(testfn)),
};
@ -789,8 +759,6 @@ pub fn test_bench_no_iter() {
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 @@ pub fn test_bench_iter() {
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);

View 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 {

View File

@ -953,8 +953,6 @@ impl Tester for Collector {
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| {

View 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;

View 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`.)

View 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,
}
}