Drop cfg(bootstrap) code
This commit is contained in:
parent
ff95473b5e
commit
31dcdc9e13
@ -1026,7 +1026,7 @@ impl Build {
|
||||
}
|
||||
|
||||
fn llvm_link_tools_dynamically(&self, target: Interned<String>) -> bool {
|
||||
(target.contains("linux-gnu") || target.contains("apple-darwin"))
|
||||
target.contains("linux-gnu") || target.contains("apple-darwin")
|
||||
}
|
||||
|
||||
/// Returns the `version` string associated with this compiler for Rust
|
||||
|
@ -1080,18 +1080,7 @@ fn run(fmt: &mut Formatter<'_>, arg: &rt::v1::Argument, args: &[ArgumentV1<'_>])
|
||||
fmt.precision = getcount(args, &arg.format.precision);
|
||||
|
||||
// Extract the correct argument
|
||||
let value = {
|
||||
#[cfg(bootstrap)]
|
||||
{
|
||||
match arg.position {
|
||||
rt::v1::Position::At(i) => args[i],
|
||||
}
|
||||
}
|
||||
#[cfg(not(bootstrap))]
|
||||
{
|
||||
args[arg.position]
|
||||
}
|
||||
};
|
||||
let value = args[arg.position];
|
||||
|
||||
// Then actually do some printing
|
||||
(value.formatter)(value.value, fmt)
|
||||
|
@ -7,9 +7,6 @@
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Argument {
|
||||
#[cfg(bootstrap)]
|
||||
pub position: Position,
|
||||
#[cfg(not(bootstrap))]
|
||||
pub position: usize,
|
||||
pub format: FormatSpec,
|
||||
}
|
||||
@ -42,9 +39,3 @@ pub enum Count {
|
||||
Param(usize),
|
||||
Implied,
|
||||
}
|
||||
|
||||
#[cfg(bootstrap)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum Position {
|
||||
At(usize),
|
||||
}
|
||||
|
@ -133,7 +133,6 @@
|
||||
#![feature(associated_type_bounds)]
|
||||
#![feature(const_type_id)]
|
||||
#![feature(const_caller_location)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![feature(assoc_int_consts)]
|
||||
|
||||
#[prelude_import]
|
||||
|
@ -18,7 +18,6 @@
|
||||
#![feature(range_is_empty)]
|
||||
#![feature(raw)]
|
||||
#![feature(saturating_neg)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![feature(sort_internals)]
|
||||
#![feature(slice_partition_at_index)]
|
||||
#![feature(specialization)]
|
||||
|
@ -282,12 +282,7 @@ pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
|
||||
//
|
||||
// In any case, we basically need to do something like this until we can
|
||||
// express more operations in statics (and we may never be able to).
|
||||
if !cfg!(bootstrap) {
|
||||
atomic_store(
|
||||
&mut THROW_INFO.pmfnUnwind as *mut _ as *mut u32,
|
||||
ptr!(exception_cleanup) as u32,
|
||||
);
|
||||
}
|
||||
atomic_store(&mut THROW_INFO.pmfnUnwind as *mut _ as *mut u32, ptr!(exception_cleanup) as u32);
|
||||
atomic_store(
|
||||
&mut THROW_INFO.pCatchableTypeArray as *mut _ as *mut u32,
|
||||
ptr!(&CATCHABLE_TYPE_ARRAY as *const _) as u32,
|
||||
@ -300,12 +295,10 @@ pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
|
||||
&mut CATCHABLE_TYPE.pType as *mut _ as *mut u32,
|
||||
ptr!(&TYPE_DESCRIPTOR as *const _) as u32,
|
||||
);
|
||||
if !cfg!(bootstrap) {
|
||||
atomic_store(
|
||||
&mut CATCHABLE_TYPE.copyFunction as *mut _ as *mut u32,
|
||||
ptr!(exception_copy) as u32,
|
||||
);
|
||||
}
|
||||
atomic_store(
|
||||
&mut CATCHABLE_TYPE.copyFunction as *mut _ as *mut u32,
|
||||
ptr!(exception_copy) as u32,
|
||||
);
|
||||
|
||||
extern "system" {
|
||||
#[unwind(allowed)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![feature(test)]
|
||||
|
||||
extern crate test;
|
||||
|
@ -42,7 +42,6 @@
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(option_expect_none)]
|
||||
#![feature(range_is_empty)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![feature(specialization)]
|
||||
#![feature(unboxed_closures)]
|
||||
#![feature(thread_local)]
|
||||
|
@ -2,8 +2,6 @@
|
||||
//! parsed by `rustc_parse` and then lowered, after the passes in this crate,
|
||||
//! by `rustc_ast_lowering`.
|
||||
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
|
||||
pub mod ast_validation;
|
||||
pub mod feature_gate;
|
||||
pub mod show_span;
|
||||
|
@ -4,7 +4,6 @@
|
||||
#![feature(box_syntax)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(libc)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![feature(try_blocks)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
|
@ -10,7 +10,6 @@
|
||||
#![feature(proc_macro_internals)]
|
||||
#![feature(proc_macro_quote)]
|
||||
#![feature(rustc_private)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![feature(specialization)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![recursion_limit = "256"]
|
||||
|
@ -7,7 +7,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
|
||||
#![feature(nll)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(inner_deref)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
|
@ -5,7 +5,6 @@
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![feature(bool_to_option)]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::print::pprust;
|
||||
|
@ -7,7 +7,6 @@
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(nll)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
#[macro_use]
|
||||
|
@ -11,7 +11,6 @@
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(label_break_value)]
|
||||
#![feature(nll)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
pub use rustc_hir::def::{Namespace, PerNS};
|
||||
|
@ -11,7 +11,6 @@
|
||||
#![feature(box_syntax)]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(nll)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
@ -8,7 +8,6 @@
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(nll)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
#[macro_use]
|
||||
|
@ -64,7 +64,6 @@ This API is completely unstable and subject to change.
|
||||
#![feature(exhaustive_patterns)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(nll)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![feature(try_blocks)]
|
||||
#![feature(never_type)]
|
||||
#![recursion_limit = "256"]
|
||||
|
@ -294,7 +294,6 @@
|
||||
#![feature(shrink_to)]
|
||||
#![feature(slice_concat_ext)]
|
||||
#![feature(slice_internals)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![feature(specialization)]
|
||||
#![feature(staged_api)]
|
||||
#![feature(std_internals)]
|
||||
|
@ -4,27 +4,6 @@
|
||||
//! library. Each macro is available for use when linking against the standard
|
||||
//! library.
|
||||
|
||||
#[cfg(bootstrap)]
|
||||
#[doc(include = "../libcore/macros/panic.md")]
|
||||
#[macro_export]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow_internal_unstable(libstd_sys_internals)]
|
||||
macro_rules! panic {
|
||||
() => ({
|
||||
$crate::panic!("explicit panic")
|
||||
});
|
||||
($msg:expr) => ({
|
||||
$crate::rt::begin_panic($msg, &($crate::file!(), $crate::line!(), $crate::column!()))
|
||||
});
|
||||
($msg:expr,) => ({
|
||||
$crate::panic!($msg)
|
||||
});
|
||||
($fmt:expr, $($arg:tt)+) => ({
|
||||
$crate::rt::begin_panic_fmt(&$crate::format_args!($fmt, $($arg)+))
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
#[doc(include = "../libcore/macros/panic.md")]
|
||||
#[macro_export]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
@ -391,7 +391,7 @@ pub fn begin_panic_handler(info: &PanicInfo<'_>) -> ! {
|
||||
#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never))]
|
||||
#[cold]
|
||||
#[track_caller]
|
||||
pub fn begin_panic<M: Any + Send>(msg: M, #[cfg(bootstrap)] _: &(&str, u32, u32)) -> ! {
|
||||
pub fn begin_panic<M: Any + Send>(msg: M) -> ! {
|
||||
if cfg!(feature = "panic_immediate_abort") {
|
||||
unsafe { intrinsics::abort() }
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
#![feature(label_break_value)]
|
||||
#![feature(nll)]
|
||||
#![feature(try_trait)]
|
||||
#![cfg_attr(bootstrap, feature(slice_patterns))]
|
||||
#![feature(unicode_internals)]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user