Skip to content

Commit 31dcdc9

Browse files
Drop cfg(bootstrap) code
1 parent ff95473 commit 31dcdc9

File tree

23 files changed

+8
-74
lines changed

23 files changed

+8
-74
lines changed

src/bootstrap/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ impl Build {
10261026
}
10271027

10281028
fn llvm_link_tools_dynamically(&self, target: Interned<String>) -> bool {
1029-
(target.contains("linux-gnu") || target.contains("apple-darwin"))
1029+
target.contains("linux-gnu") || target.contains("apple-darwin")
10301030
}
10311031

10321032
/// Returns the `version` string associated with this compiler for Rust

src/libcore/fmt/mod.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,18 +1080,7 @@ fn run(fmt: &mut Formatter<'_>, arg: &rt::v1::Argument, args: &[ArgumentV1<'_>])
10801080
fmt.precision = getcount(args, &arg.format.precision);
10811081

10821082
// Extract the correct argument
1083-
let value = {
1084-
#[cfg(bootstrap)]
1085-
{
1086-
match arg.position {
1087-
rt::v1::Position::At(i) => args[i],
1088-
}
1089-
}
1090-
#[cfg(not(bootstrap))]
1091-
{
1092-
args[arg.position]
1093-
}
1094-
};
1083+
let value = args[arg.position];
10951084

10961085
// Then actually do some printing
10971086
(value.formatter)(value.value, fmt)

src/libcore/fmt/rt/v1.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
#[derive(Copy, Clone)]
99
pub struct Argument {
10-
#[cfg(bootstrap)]
11-
pub position: Position,
12-
#[cfg(not(bootstrap))]
1310
pub position: usize,
1411
pub format: FormatSpec,
1512
}
@@ -42,9 +39,3 @@ pub enum Count {
4239
Param(usize),
4340
Implied,
4441
}
45-
46-
#[cfg(bootstrap)]
47-
#[derive(Copy, Clone)]
48-
pub enum Position {
49-
At(usize),
50-
}

src/libcore/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@
133133
#![feature(associated_type_bounds)]
134134
#![feature(const_type_id)]
135135
#![feature(const_caller_location)]
136-
#![cfg_attr(bootstrap, feature(slice_patterns))]
137136
#![feature(assoc_int_consts)]
138137

139138
#[prelude_import]

src/libcore/tests/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#![feature(range_is_empty)]
1919
#![feature(raw)]
2020
#![feature(saturating_neg)]
21-
#![cfg_attr(bootstrap, feature(slice_patterns))]
2221
#![feature(sort_internals)]
2322
#![feature(slice_partition_at_index)]
2423
#![feature(specialization)]

src/libpanic_unwind/seh.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,7 @@ pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
282282
//
283283
// In any case, we basically need to do something like this until we can
284284
// express more operations in statics (and we may never be able to).
285-
if !cfg!(bootstrap) {
286-
atomic_store(
287-
&mut THROW_INFO.pmfnUnwind as *mut _ as *mut u32,
288-
ptr!(exception_cleanup) as u32,
289-
);
290-
}
285+
atomic_store(&mut THROW_INFO.pmfnUnwind as *mut _ as *mut u32, ptr!(exception_cleanup) as u32);
291286
atomic_store(
292287
&mut THROW_INFO.pCatchableTypeArray as *mut _ as *mut u32,
293288
ptr!(&CATCHABLE_TYPE_ARRAY as *const _) as u32,
@@ -300,12 +295,10 @@ pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
300295
&mut CATCHABLE_TYPE.pType as *mut _ as *mut u32,
301296
ptr!(&TYPE_DESCRIPTOR as *const _) as u32,
302297
);
303-
if !cfg!(bootstrap) {
304-
atomic_store(
305-
&mut CATCHABLE_TYPE.copyFunction as *mut _ as *mut u32,
306-
ptr!(exception_copy) as u32,
307-
);
308-
}
298+
atomic_store(
299+
&mut CATCHABLE_TYPE.copyFunction as *mut _ as *mut u32,
300+
ptr!(exception_copy) as u32,
301+
);
309302

310303
extern "system" {
311304
#[unwind(allowed)]

src/librustc/benches/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![cfg_attr(bootstrap, feature(slice_patterns))]
21
#![feature(test)]
32

43
extern crate test;

src/librustc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#![feature(optin_builtin_traits)]
4343
#![feature(option_expect_none)]
4444
#![feature(range_is_empty)]
45-
#![cfg_attr(bootstrap, feature(slice_patterns))]
4645
#![feature(specialization)]
4746
#![feature(unboxed_closures)]
4847
#![feature(thread_local)]

src/librustc_ast_passes/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
//! parsed by `rustc_parse` and then lowered, after the passes in this crate,
33
//! by `rustc_ast_lowering`.
44
5-
#![cfg_attr(bootstrap, feature(slice_patterns))]
6-
75
pub mod ast_validation;
86
pub mod feature_gate;
97
pub mod show_span;

src/librustc_codegen_ssa/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![feature(box_syntax)]
55
#![feature(core_intrinsics)]
66
#![feature(libc)]
7-
#![cfg_attr(bootstrap, feature(slice_patterns))]
87
#![feature(stmt_expr_attributes)]
98
#![feature(try_blocks)]
109
#![feature(in_band_lifetimes)]

0 commit comments

Comments
 (0)