Skip to content

Commit 6e0fe79

Browse files
Lukas MarkeffskyMark-Simulacrum
authored andcommitted
delete more cfg(bootstrap)
1 parent 105c50e commit 6e0fe79

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

std/src/process.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2164,18 +2164,11 @@ pub fn id() -> u32 {
21642164
/// to provide similar functionality.
21652165
#[cfg_attr(not(test), lang = "termination")]
21662166
#[stable(feature = "termination_trait_lib", since = "1.61.0")]
2167-
#[rustc_on_unimplemented(
2168-
on(
2169-
all(not(bootstrap), cause = "MainFunctionType"),
2170-
message = "`main` has invalid return type `{Self}`",
2171-
label = "`main` can only return types that implement `{Termination}`"
2172-
),
2173-
on(
2174-
bootstrap,
2175-
message = "`main` has invalid return type `{Self}`",
2176-
label = "`main` can only return types that implement `{Termination}`"
2177-
)
2178-
)]
2167+
#[rustc_on_unimplemented(on(
2168+
cause = "MainFunctionType",
2169+
message = "`main` has invalid return type `{Self}`",
2170+
label = "`main` can only return types that implement `{Termination}`"
2171+
))]
21792172
pub trait Termination {
21802173
/// Is called to get the representation of the value as status code.
21812174
/// This status code is returned to the operating system.

std/src/sys/unix/mod.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,7 @@ pub unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) {
184184
sigpipe::SIG_DFL => (true, Some(libc::SIG_DFL)),
185185
_ => unreachable!(),
186186
};
187-
// The bootstrap compiler doesn't know about sigpipe::DEFAULT, and always passes in
188-
// SIG_IGN. This causes some tests to fail because they expect SIGPIPE to be reset to
189-
// default on process spawning (which doesn't happen if #[unix_sigpipe] is specified).
190-
// Since we can't differentiate between the cases here, treat SIG_IGN as DEFAULT
191-
// unconditionally.
192-
if sigpipe_attr_specified && !(cfg!(bootstrap) && sigpipe == sigpipe::SIG_IGN) {
187+
if sigpipe_attr_specified {
193188
UNIX_SIGPIPE_ATTR_SPECIFIED.store(true, crate::sync::atomic::Ordering::Relaxed);
194189
}
195190
if let Some(handler) = handler {

std/tests/run-time-detect.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#![cfg_attr(
44
any(
55
all(target_arch = "arm", any(target_os = "linux", target_os = "android")),
6-
all(bootstrap, target_arch = "aarch64", any(target_os = "linux", target_os = "android")),
76
all(target_arch = "powerpc", target_os = "linux"),
87
all(target_arch = "powerpc64", target_os = "linux"),
98
),

0 commit comments

Comments
 (0)