diff options
| author | Pavel Grigorenko <GrigorenkoPV@ya.ru> | 2024-07-14 21:43:20 +0300 |
|---|---|---|
| committer | Pavel Grigorenko <GrigorenkoPV@ya.ru> | 2024-07-14 21:43:20 +0300 |
| commit | bbf303ed146d9f5bb08caabf153019ab1909c83e (patch) | |
| tree | 123769461557e8ba4fc89d667db15cdb6086702d /library/std/src | |
| parent | 88fa119c77682e6d55ce21001cf761675cfebeae (diff) | |
| download | rust-bbf303ed146d9f5bb08caabf153019ab1909c83e.tar.gz rust-bbf303ed146d9f5bb08caabf153019ab1909c83e.zip | |
sys::init is not unsafe on teeos
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/rt.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/library/std/src/rt.rs b/library/std/src/rt.rs index c0a1c5f5594..d030017cfb4 100644 --- a/library/std/src/rt.rs +++ b/library/std/src/rt.rs @@ -90,13 +90,14 @@ macro_rules! rtunwrap { // `compiler/rustc_session/src/config/sigpipe.rs`. #[cfg_attr(test, allow(dead_code))] unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) { + #[cfg_attr(target_os = "teeos", allow(unused_unsafe))] unsafe { - sys::init(argc, argv, sigpipe); + sys::init(argc, argv, sigpipe) + }; - // Set up the current thread to give it the right name. - let thread = Thread::new_main(); - thread::set_current(thread); - } + // Set up the current thread to give it the right name. + let thread = Thread::new_main(); + thread::set_current(thread); } // One-time runtime cleanup. |
