Auto merge of #127732 - GrigorenkoPV:teeos-safe-sys-init, r=Amanieu · model-checking/verify-rust-std@d7aa7cf (original) (raw)
`@@ -90,13 +90,14 @@ macro_rules! rtunwrap {
`
90
90
`` // compiler/rustc_session/src/config/sigpipe.rs
.
``
91
91
`#[cfg_attr(test, allow(dead_code))]
`
92
92
`unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) {
`
``
93
`+
#[cfg_attr(target_os = "teeos", allow(unused_unsafe))]
`
93
94
`unsafe {
`
94
``
`-
sys::init(argc, argv, sigpipe);
`
``
95
`+
sys::init(argc, argv, sigpipe)
`
``
96
`+
};
`
95
97
``
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);
`
100
101
`}
`
101
102
``
102
103
`// One-time runtime cleanup.
`