Sync from rust 1fdfe1234795a289af1088aefa92ef80191cb611

This commit is contained in:
bjorn3 2023-12-07 14:19:46 +00:00
commit 2559532a35
3 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ fn main() {
args.push(codegen_backend_arg);
}
if !passed_args.iter().any(|arg| {
arg == "--sysroot" || arg.to_str().map(|s| s.starts_with("--sysroot=")) == Some(true)
arg == "--sysroot" || arg.to_str().is_some_and(|s| s.starts_with("--sysroot="))
}) {
args.push(OsString::from("--sysroot"));
args.push(OsString::from(sysroot.to_str().unwrap()));

View File

@ -27,7 +27,7 @@ fn main() {
args.push(codegen_backend_arg);
}
if !passed_args.iter().any(|arg| {
arg == "--sysroot" || arg.to_str().map(|s| s.starts_with("--sysroot=")) == Some(true)
arg == "--sysroot" || arg.to_str().is_some_and(|s| s.starts_with("--sysroot="))
}) {
args.push(OsString::from("--sysroot"));
args.push(OsString::from(sysroot.to_str().unwrap()));

View File

@ -64,7 +64,7 @@ impl ConcurrencyLimiter {
// Make sure to drop the mutex guard first to prevent poisoning the mutex.
drop(state);
if let Some(err) = err {
handler.fatal(err).raise();
handler.fatal(err);
} else {
// The error was already emitted, but compilation continued. Raise a silent
// fatal error.