Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0873299

Browse files
committedJul 14, 2024
sys::init is not unsafe on teeos
1 parent 54435f7 commit 0873299

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
 

‎std/src/rt.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,14 @@ macro_rules! rtunwrap {
9090
// `compiler/rustc_session/src/config/sigpipe.rs`.
9191
#[cfg_attr(test, allow(dead_code))]
9292
unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) {
93+
#[cfg_attr(target_os = "teeos", allow(unused_unsafe))]
9394
unsafe {
94-
sys::init(argc, argv, sigpipe);
95+
sys::init(argc, argv, sigpipe)
96+
};
9597

96-
// Set up the current thread to give it the right name.
97-
let thread = Thread::new_main();
98-
thread::set_current(thread);
99-
}
98+
// Set up the current thread to give it the right name.
99+
let thread = Thread::new_main();
100+
thread::set_current(thread);
100101
}
101102

102103
// One-time runtime cleanup.

0 commit comments

Comments
 (0)
Failed to load comments.