Auto merge of #2530 - oli-obk:rustup, r=RalfJung

Rustup

Breakage issue: https://github.com/rust-lang/rust/issues/101324
This commit is contained in:
bors 2022-09-02 14:10:46 +00:00
commit dba35d2be7
3 changed files with 8 additions and 8 deletions

View File

@ -76,7 +76,7 @@ pub fn setup(subcommand: &MiriCommand, host: &str, target: &str) {
show_error!("xargo is too old; please upgrade to the latest version") show_error!("xargo is too old; please upgrade to the latest version")
} }
let mut cmd = cargo(); let mut cmd = cargo();
cmd.args(&["install", "xargo"]); cmd.args(["install", "xargo"]);
ask_to_run(cmd, ask_user, "install a recent enough xargo"); ask_to_run(cmd, ask_user, "install a recent enough xargo");
} }
@ -93,7 +93,7 @@ pub fn setup(subcommand: &MiriCommand, host: &str, target: &str) {
None => { None => {
// Check for `rust-src` rustup component. // Check for `rust-src` rustup component.
let output = miri_for_host() let output = miri_for_host()
.args(&["--print", "sysroot"]) .args(["--print", "sysroot"])
.output() .output()
.expect("failed to determine sysroot"); .expect("failed to determine sysroot");
if !output.status.success() { if !output.status.success() {
@ -110,7 +110,7 @@ pub fn setup(subcommand: &MiriCommand, host: &str, target: &str) {
if !rustup_src.join("std").join("Cargo.toml").exists() { if !rustup_src.join("std").join("Cargo.toml").exists() {
// Ask the user to install the `rust-src` component, and use that. // Ask the user to install the `rust-src` component, and use that.
let mut cmd = Command::new("rustup"); let mut cmd = Command::new("rustup");
cmd.args(&["component", "add", "rust-src"]); cmd.args(["component", "add", "rust-src"]);
ask_to_run( ask_to_run(
cmd, cmd,
ask_user, ask_user,
@ -136,7 +136,7 @@ pub fn setup(subcommand: &MiriCommand, host: &str, target: &str) {
let dirs = directories::ProjectDirs::from("org", "rust-lang", "miri").unwrap(); let dirs = directories::ProjectDirs::from("org", "rust-lang", "miri").unwrap();
let dir = dirs.cache_dir(); let dir = dirs.cache_dir();
if !dir.exists() { if !dir.exists() {
fs::create_dir_all(&dir).unwrap(); fs::create_dir_all(dir).unwrap();
} }
// The interesting bit: Xargo.toml (only needs content if we actually need std) // The interesting bit: Xargo.toml (only needs content if we actually need std)
let xargo_toml = if std::env::var_os("MIRI_NO_STD").is_some() { let xargo_toml = if std::env::var_os("MIRI_NO_STD").is_some() {
@ -178,8 +178,8 @@ pub fn setup(subcommand: &MiriCommand, host: &str, target: &str) {
// Now invoke xargo. // Now invoke xargo.
let mut command = xargo_check(); let mut command = xargo_check();
command.arg("check").arg("-q"); command.arg("check").arg("-q");
command.current_dir(&dir); command.current_dir(dir);
command.env("XARGO_HOME", &dir); command.env("XARGO_HOME", dir);
command.env("XARGO_RUST_SRC", &rust_src); command.env("XARGO_RUST_SRC", &rust_src);
// We always need to set a target so rustc bootstrap can tell apart host from target crates. // We always need to set a target so rustc bootstrap can tell apart host from target crates.
command.arg("--target").arg(target); command.arg("--target").arg(target);

View File

@ -1 +1 @@
4fd4de7ea358ad6fc28c5780533ea8ccc09e1006 9353538c7bea6edb245457712cec720305c4576e

View File

@ -16,7 +16,7 @@ fn check_conditional_variables_notify_all() {
let (lock, cvar) = &*pair2; let (lock, cvar) = &*pair2;
let guard = lock.lock().unwrap(); let guard = lock.lock().unwrap();
// Block waiting on the conditional variable. // Block waiting on the conditional variable.
let _ = cvar.wait(guard).unwrap(); let _guard = cvar.wait(guard).unwrap();
}) })
}) })
.inspect(|_| { .inspect(|_| {