mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-22 12:43:36 +00:00
update cfg(bootstrap)s
This commit is contained in:
parent
970e603006
commit
5b3462c556
@ -2,7 +2,6 @@
|
||||
#![feature(associated_type_defaults)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(decl_macro)]
|
||||
#![cfg_attr(bootstrap, feature(destructuring_assignment))]
|
||||
#![feature(if_let_guard)]
|
||||
#![feature(let_else)]
|
||||
#![feature(proc_macro_diagnostic)]
|
||||
|
@ -784,24 +784,11 @@ rustc_queries! {
|
||||
desc { |tcx| "type-checking `{}`", tcx.def_path_str(key.to_def_id()) }
|
||||
cache_on_disk_if { true }
|
||||
load_cached(tcx, id) {
|
||||
#[cfg(bootstrap)]
|
||||
{
|
||||
match match tcx.on_disk_cache().as_ref() {
|
||||
Some(c) => c.try_load_query_result(*tcx, id),
|
||||
None => None,
|
||||
} {
|
||||
Some(x) => Some(&*tcx.arena.alloc(x)),
|
||||
None => None,
|
||||
}
|
||||
}
|
||||
#[cfg(not(bootstrap))]
|
||||
{
|
||||
let typeck_results: Option<ty::TypeckResults<'tcx>> = tcx
|
||||
.on_disk_cache().as_ref()
|
||||
.and_then(|c| c.try_load_query_result(*tcx, id));
|
||||
let typeck_results: Option<ty::TypeckResults<'tcx>> = tcx
|
||||
.on_disk_cache().as_ref()
|
||||
.and_then(|c| c.try_load_query_result(*tcx, id));
|
||||
|
||||
typeck_results.map(|x| &*tcx.arena.alloc(x))
|
||||
}
|
||||
typeck_results.map(|x| &*tcx.arena.alloc(x))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,17 +67,14 @@
|
||||
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
|
||||
test(no_crate_inject, attr(allow(unused_variables), deny(warnings)))
|
||||
)]
|
||||
#![cfg_attr(
|
||||
not(bootstrap),
|
||||
doc(cfg_hide(
|
||||
not(test),
|
||||
not(any(test, bootstrap)),
|
||||
any(not(feature = "miri-test-libstd"), test, doctest),
|
||||
no_global_oom_handling,
|
||||
not(no_global_oom_handling),
|
||||
target_has_atomic = "ptr"
|
||||
))
|
||||
)]
|
||||
#![doc(cfg_hide(
|
||||
not(test),
|
||||
not(any(test, bootstrap)),
|
||||
any(not(feature = "miri-test-libstd"), test, doctest),
|
||||
no_global_oom_handling,
|
||||
not(no_global_oom_handling),
|
||||
target_has_atomic = "ptr"
|
||||
))]
|
||||
#![no_std]
|
||||
#![needs_allocator]
|
||||
//
|
||||
@ -151,7 +148,6 @@
|
||||
#![feature(const_precise_live_drops)]
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(const_try)]
|
||||
#![cfg_attr(bootstrap, feature(destructuring_assignment))]
|
||||
#![feature(dropck_eyepatch)]
|
||||
#![feature(exclusive_range_pattern)]
|
||||
#![feature(fundamental)]
|
||||
|
@ -1310,11 +1310,7 @@ impl Clone for BorrowRef<'_> {
|
||||
///
|
||||
/// See the [module-level documentation](self) for more.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg_attr(
|
||||
not(bootstrap),
|
||||
must_not_suspend = "holding a Ref across suspend \
|
||||
points can cause BorrowErrors"
|
||||
)]
|
||||
#[must_not_suspend = "holding a Ref across suspend points can cause BorrowErrors"]
|
||||
pub struct Ref<'b, T: ?Sized + 'b> {
|
||||
value: &'b T,
|
||||
borrow: BorrowRef<'b>,
|
||||
@ -1692,11 +1688,7 @@ impl<'b> BorrowRefMut<'b> {
|
||||
///
|
||||
/// See the [module-level documentation](self) for more.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg_attr(
|
||||
not(bootstrap),
|
||||
must_not_suspend = "holding a RefMut across suspend \
|
||||
points can cause BorrowErrors"
|
||||
)]
|
||||
#[must_not_suspend = "holding a RefMut across suspend points can cause BorrowErrors"]
|
||||
pub struct RefMut<'b, T: ?Sized + 'b> {
|
||||
value: &'b mut T,
|
||||
borrow: BorrowRefMut<'b>,
|
||||
|
@ -13,7 +13,7 @@ pub trait IntoFuture {
|
||||
|
||||
/// Creates a future from a value.
|
||||
#[unstable(feature = "into_future", issue = "67644")]
|
||||
#[cfg_attr(not(bootstrap), lang = "into_future")]
|
||||
#[lang = "into_future"]
|
||||
fn into_future(self) -> Self::Future;
|
||||
}
|
||||
|
||||
|
@ -60,32 +60,29 @@
|
||||
test(no_crate_inject, attr(deny(warnings))),
|
||||
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
|
||||
)]
|
||||
#![cfg_attr(
|
||||
not(bootstrap),
|
||||
doc(cfg_hide(
|
||||
not(test),
|
||||
any(not(feature = "miri-test-libstd"), test, doctest),
|
||||
no_fp_fmt_parse,
|
||||
target_pointer_width = "16",
|
||||
target_pointer_width = "32",
|
||||
target_pointer_width = "64",
|
||||
target_has_atomic = "8",
|
||||
target_has_atomic = "16",
|
||||
target_has_atomic = "32",
|
||||
target_has_atomic = "64",
|
||||
target_has_atomic = "ptr",
|
||||
target_has_atomic_equal_alignment = "8",
|
||||
target_has_atomic_equal_alignment = "16",
|
||||
target_has_atomic_equal_alignment = "32",
|
||||
target_has_atomic_equal_alignment = "64",
|
||||
target_has_atomic_equal_alignment = "ptr",
|
||||
target_has_atomic_load_store = "8",
|
||||
target_has_atomic_load_store = "16",
|
||||
target_has_atomic_load_store = "32",
|
||||
target_has_atomic_load_store = "64",
|
||||
target_has_atomic_load_store = "ptr",
|
||||
))
|
||||
)]
|
||||
#![doc(cfg_hide(
|
||||
not(test),
|
||||
any(not(feature = "miri-test-libstd"), test, doctest),
|
||||
no_fp_fmt_parse,
|
||||
target_pointer_width = "16",
|
||||
target_pointer_width = "32",
|
||||
target_pointer_width = "64",
|
||||
target_has_atomic = "8",
|
||||
target_has_atomic = "16",
|
||||
target_has_atomic = "32",
|
||||
target_has_atomic = "64",
|
||||
target_has_atomic = "ptr",
|
||||
target_has_atomic_equal_alignment = "8",
|
||||
target_has_atomic_equal_alignment = "16",
|
||||
target_has_atomic_equal_alignment = "32",
|
||||
target_has_atomic_equal_alignment = "64",
|
||||
target_has_atomic_equal_alignment = "ptr",
|
||||
target_has_atomic_load_store = "8",
|
||||
target_has_atomic_load_store = "16",
|
||||
target_has_atomic_load_store = "32",
|
||||
target_has_atomic_load_store = "64",
|
||||
target_has_atomic_load_store = "ptr",
|
||||
))]
|
||||
#![no_core]
|
||||
//
|
||||
// Lints:
|
||||
|
@ -1003,7 +1003,6 @@ pub(crate) mod builtin {
|
||||
/// assert_eq!(s, b"ABCDEF");
|
||||
/// # }
|
||||
/// ```
|
||||
#[cfg(not(bootstrap))]
|
||||
#[unstable(feature = "concat_bytes", issue = "87555")]
|
||||
#[rustc_builtin_macro]
|
||||
#[macro_export]
|
||||
|
@ -65,7 +65,6 @@ pub use crate::{
|
||||
issue = "87555",
|
||||
reason = "`concat_bytes` is not stable enough for use and is subject to change"
|
||||
)]
|
||||
#[cfg(not(bootstrap))]
|
||||
#[doc(no_inline)]
|
||||
pub use crate::concat_bytes;
|
||||
|
||||
|
@ -204,7 +204,6 @@ fn cmp_default() {
|
||||
assert_eq!(Fool(false), Fool(true));
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
mod const_cmp {
|
||||
use super::*;
|
||||
|
||||
|
@ -37,7 +37,6 @@ fn test_assume_can_be_in_const_contexts() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(bootstrap))]
|
||||
const fn test_write_bytes_in_const_contexts() {
|
||||
use core::intrinsics::write_bytes;
|
||||
|
||||
|
@ -251,7 +251,6 @@ fn test_set_memory() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(bootstrap))]
|
||||
fn test_set_memory_const() {
|
||||
const XS: [u8; 20] = {
|
||||
let mut xs = [0u8; 20];
|
||||
|
@ -195,15 +195,12 @@
|
||||
test(no_crate_inject, attr(deny(warnings))),
|
||||
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
|
||||
)]
|
||||
#![cfg_attr(
|
||||
not(bootstrap),
|
||||
doc(cfg_hide(
|
||||
not(test),
|
||||
not(any(test, bootstrap)),
|
||||
no_global_oom_handling,
|
||||
not(no_global_oom_handling)
|
||||
))
|
||||
)]
|
||||
#![doc(cfg_hide(
|
||||
not(test),
|
||||
not(any(test, bootstrap)),
|
||||
no_global_oom_handling,
|
||||
not(no_global_oom_handling)
|
||||
))]
|
||||
// Don't link to std. We are std.
|
||||
#![no_std]
|
||||
#![warn(deprecated_in_future)]
|
||||
@ -249,7 +246,7 @@
|
||||
#![feature(cfg_target_thread_local)]
|
||||
#![feature(char_error_internals)]
|
||||
#![feature(char_internals)]
|
||||
#![cfg_attr(not(bootstrap), feature(concat_bytes))]
|
||||
#![feature(concat_bytes)]
|
||||
#![feature(concat_idents)]
|
||||
#![feature(const_fn_floating_point_arithmetic)]
|
||||
#![feature(const_fn_fn_ptr_basics)]
|
||||
@ -578,7 +575,6 @@ pub use core::{
|
||||
issue = "87555",
|
||||
reason = "`concat_bytes` is not stable enough for use and is subject to change"
|
||||
)]
|
||||
#[cfg(not(bootstrap))]
|
||||
pub use core::concat_bytes;
|
||||
|
||||
#[stable(feature = "core_primitive", since = "1.43.0")]
|
||||
|
@ -49,7 +49,6 @@ pub use core::prelude::v1::{
|
||||
issue = "87555",
|
||||
reason = "`concat_bytes` is not stable enough for use and is subject to change"
|
||||
)]
|
||||
#[cfg(not(bootstrap))]
|
||||
#[doc(no_inline)]
|
||||
pub use core::prelude::v1::concat_bytes;
|
||||
|
||||
|
@ -188,12 +188,9 @@ unsafe impl<T: ?Sized + Send> Sync for Mutex<T> {}
|
||||
/// [`lock`]: Mutex::lock
|
||||
/// [`try_lock`]: Mutex::try_lock
|
||||
#[must_use = "if unused the Mutex will immediately unlock"]
|
||||
#[cfg_attr(
|
||||
not(bootstrap),
|
||||
must_not_suspend = "holding a MutexGuard across suspend \
|
||||
#[must_not_suspend = "holding a MutexGuard across suspend \
|
||||
points can cause deadlocks, delays, \
|
||||
and cause Futures to not implement `Send`"
|
||||
)]
|
||||
and cause Futures to not implement `Send`"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct MutexGuard<'a, T: ?Sized + 'a> {
|
||||
lock: &'a Mutex<T>,
|
||||
|
@ -95,12 +95,9 @@ unsafe impl<T: ?Sized + Send + Sync> Sync for RwLock<T> {}
|
||||
/// [`read`]: RwLock::read
|
||||
/// [`try_read`]: RwLock::try_read
|
||||
#[must_use = "if unused the RwLock will immediately unlock"]
|
||||
#[cfg_attr(
|
||||
not(bootstrap),
|
||||
must_not_suspend = "holding a RwLockReadGuard across suspend \
|
||||
#[must_not_suspend = "holding a RwLockReadGuard across suspend \
|
||||
points can cause deadlocks, delays, \
|
||||
and cause Futures to not implement `Send`"
|
||||
)]
|
||||
and cause Futures to not implement `Send`"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct RwLockReadGuard<'a, T: ?Sized + 'a> {
|
||||
lock: &'a RwLock<T>,
|
||||
@ -121,12 +118,9 @@ unsafe impl<T: ?Sized + Sync> Sync for RwLockReadGuard<'_, T> {}
|
||||
/// [`write`]: RwLock::write
|
||||
/// [`try_write`]: RwLock::try_write
|
||||
#[must_use = "if unused the RwLock will immediately unlock"]
|
||||
#[cfg_attr(
|
||||
not(bootstrap),
|
||||
must_not_suspend = "holding a RwLockWriteGuard across suspend \
|
||||
#[must_not_suspend = "holding a RwLockWriteGuard across suspend \
|
||||
points can cause deadlocks, delays, \
|
||||
and cause Future's to not implement `Send`"
|
||||
)]
|
||||
and cause Future's to not implement `Send`"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct RwLockWriteGuard<'a, T: ?Sized + 'a> {
|
||||
lock: &'a RwLock<T>,
|
||||
|
@ -988,20 +988,11 @@ impl<'a> Builder<'a> {
|
||||
}
|
||||
};
|
||||
|
||||
// cfg(bootstrap) -- drop the compiler.stage == 0 branch.
|
||||
if compiler.stage == 0 {
|
||||
if use_new_symbol_mangling {
|
||||
rustflags.arg("-Zsymbol-mangling-version=v0");
|
||||
} else {
|
||||
rustflags.arg("-Zsymbol-mangling-version=legacy");
|
||||
}
|
||||
if use_new_symbol_mangling {
|
||||
rustflags.arg("-Csymbol-mangling-version=v0");
|
||||
} else {
|
||||
if use_new_symbol_mangling {
|
||||
rustflags.arg("-Csymbol-mangling-version=v0");
|
||||
} else {
|
||||
rustflags.arg("-Csymbol-mangling-version=legacy");
|
||||
rustflags.arg("-Zunstable-options");
|
||||
}
|
||||
rustflags.arg("-Csymbol-mangling-version=legacy");
|
||||
rustflags.arg("-Zunstable-options");
|
||||
}
|
||||
|
||||
// FIXME: It might be better to use the same value for both `RUSTFLAGS` and `RUSTDOCFLAGS`,
|
||||
|
Loading…
Reference in New Issue
Block a user