Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit594702e

Browse files
committed
Auto merge of#127732 - GrigorenkoPV:teeos-safe-sys-init, r=Amanieu
sys::init is not unsafe on teeoshttps://github.com/rust-lang/rust/blob/88fa119c77682e6d55ce21001cf761675cfebeae/library/std/src/sys/pal/teeos/mod.rs#L40-L42r​? `@petrochenkov`
2 parents8b72d7a +bbf303e commit594702e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎library/std/src/rt.rs‎

Lines changed: 6 additions & 5 deletions
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
unsafefninit(argc:isize,argv:*const*constu8,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)

[8]ページ先頭

©2009-2025 Movatter.jp