Skip to content

Commit b6bbf4e

Browse files
committed
allow (expect) deprecated
1 parent fc668d5 commit b6bbf4e

File tree

1 file changed

+2
-0
lines changed
  • library/std/src/sys/pal/unix

1 file changed

+2
-0
lines changed

library/std/src/sys/pal/unix/os.rs

+2
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,13 @@ pub fn current_exe() -> io::Result<PathBuf> {
428428
pub fn current_exe() -> io::Result<PathBuf> {
429429
unsafe {
430430
let mut sz: u32 = 0;
431+
#[expect(deprecated)]
431432
libc::_NSGetExecutablePath(ptr::null_mut(), &mut sz);
432433
if sz == 0 {
433434
return Err(io::Error::last_os_error());
434435
}
435436
let mut v: Vec<u8> = Vec::with_capacity(sz as usize);
437+
#[expect(deprecated)]
436438
let err = libc::_NSGetExecutablePath(v.as_mut_ptr() as *mut i8, &mut sz);
437439
if err != 0 {
438440
return Err(io::Error::last_os_error());

0 commit comments

Comments
 (0)