Skip to content

Commit 82c5814

Browse files
committed
Auto merge of rust-lang#87509 - JohnTitor:rollup-8iqn6cl, r=JohnTitor
Rollup of 10 pull requests Successful merges: - rust-lang#86450 (Add flag to configure `large_assignments` lint) - rust-lang#86764 (Avoid ICE on type error recovery) - rust-lang#87354 (Update VxWork's UNIX support) - rust-lang#87427 (get rid of NoMirFor error variant) - rust-lang#87446 (macos current_exe using directly libc instead.) - rust-lang#87494 (fix typo: whenver -> whenever) - rust-lang#87497 (Add long explanation for E0544.) - rust-lang#87499 (Remove ASCII fast path from `rustc_lexer::{is_id_continue, is_id_start}`) - rust-lang#87502 (Update cargo) - rust-lang#87503 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents ee2f754 + 47ec547 commit 82c5814

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

core/src/cell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ impl<T> Cell<[T]> {
583583
pub struct RefCell<T: ?Sized> {
584584
borrow: Cell<BorrowFlag>,
585585
// Stores the location of the earliest currently active borrow.
586-
// This gets updated whenver we go from having zero borrows
586+
// This gets updated whenever we go from having zero borrows
587587
// to having a single borrow. When a borrow occurs, this gets included
588588
// in the generated `BorrowError/`BorrowMutError`
589589
#[cfg(feature = "debug_refcell")]

std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cfg-if = { version = "0.1.8", features = ['rustc-dep-of-std'] }
1616
panic_unwind = { path = "../panic_unwind", optional = true }
1717
panic_abort = { path = "../panic_abort" }
1818
core = { path = "../core" }
19-
libc = { version = "0.2.93", default-features = false, features = ['rustc-dep-of-std'] }
19+
libc = { version = "0.2.98", default-features = false, features = ['rustc-dep-of-std'] }
2020
compiler_builtins = { version = "0.1.44" }
2121
profiler_builtins = { path = "../profiler_builtins", optional = true }
2222
unwind = { path = "../unwind" }

std/src/sys/unix/os.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,17 +350,14 @@ pub fn current_exe() -> io::Result<PathBuf> {
350350

351351
#[cfg(any(target_os = "macos", target_os = "ios"))]
352352
pub fn current_exe() -> io::Result<PathBuf> {
353-
extern "C" {
354-
fn _NSGetExecutablePath(buf: *mut libc::c_char, bufsize: *mut u32) -> libc::c_int;
355-
}
356353
unsafe {
357354
let mut sz: u32 = 0;
358-
_NSGetExecutablePath(ptr::null_mut(), &mut sz);
355+
libc::_NSGetExecutablePath(ptr::null_mut(), &mut sz);
359356
if sz == 0 {
360357
return Err(io::Error::last_os_error());
361358
}
362359
let mut v: Vec<u8> = Vec::with_capacity(sz as usize);
363-
let err = _NSGetExecutablePath(v.as_mut_ptr() as *mut i8, &mut sz);
360+
let err = libc::_NSGetExecutablePath(v.as_mut_ptr() as *mut i8, &mut sz);
364361
if err != 0 {
365362
return Err(io::Error::last_os_error());
366363
}

std/src/sys/unix/os/tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
use super::*;
22

33
#[test]
4+
#[cfg(not(target_os = "vxworks"))]
45
fn test_glibc_version() {
56
// This mostly just tests that the weak linkage doesn't panic wildly...
67
glibc_version();
78
}
89

910
#[test]
11+
#[cfg(not(target_os = "vxworks"))]
1012
fn test_parse_glibc_version() {
1113
let cases = [
1214
("0.0", Some((0, 0))),

std/src/sys/unix/process/process_common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ cfg_if::cfg_if! {
5050
raw[bit / 8] |= 1 << (bit % 8);
5151
return 0;
5252
}
53-
} else if #[cfg(not(target_os = "vxworks"))] {
53+
} else {
5454
pub use libc::{sigemptyset, sigaddset};
5555
}
5656
}

0 commit comments

Comments
 (0)