From 7155a2190ee515fb7c73b533e559f46c774a055b Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Fri, 2 Sep 2022 13:55:18 +0000 Subject: [PATCH 1/3] Rustup --- rust-version | 2 +- tests/pass/concurrency/sync_nopreempt.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust-version b/rust-version index 0909f24752a..0b9f9bba0ad 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -4fd4de7ea358ad6fc28c5780533ea8ccc09e1006 +9353538c7bea6edb245457712cec720305c4576e diff --git a/tests/pass/concurrency/sync_nopreempt.rs b/tests/pass/concurrency/sync_nopreempt.rs index a53f143fef6..83ecd72ce8d 100644 --- a/tests/pass/concurrency/sync_nopreempt.rs +++ b/tests/pass/concurrency/sync_nopreempt.rs @@ -16,7 +16,7 @@ fn check_conditional_variables_notify_all() { let (lock, cvar) = &*pair2; let guard = lock.lock().unwrap(); // Block waiting on the conditional variable. - let _ = cvar.wait(guard).unwrap(); + let _x = cvar.wait(guard).unwrap(); }) }) .inspect(|_| { From 6a29a6842ad6b650cb7cdbf823e3b732e8b9997a Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Fri, 2 Sep 2022 13:55:26 +0000 Subject: [PATCH 2/3] Clippy after rustup --- cargo-miri/src/setup.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cargo-miri/src/setup.rs b/cargo-miri/src/setup.rs index 62d6e25a53e..c27bb186317 100644 --- a/cargo-miri/src/setup.rs +++ b/cargo-miri/src/setup.rs @@ -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") } let mut cmd = cargo(); - cmd.args(&["install", "xargo"]); + cmd.args(["install", "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 => { // Check for `rust-src` rustup component. let output = miri_for_host() - .args(&["--print", "sysroot"]) + .args(["--print", "sysroot"]) .output() .expect("failed to determine sysroot"); 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() { // Ask the user to install the `rust-src` component, and use that. let mut cmd = Command::new("rustup"); - cmd.args(&["component", "add", "rust-src"]); + cmd.args(["component", "add", "rust-src"]); ask_to_run( cmd, 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 dir = dirs.cache_dir(); 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) 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. let mut command = xargo_check(); command.arg("check").arg("-q"); - command.current_dir(&dir); - command.env("XARGO_HOME", &dir); + command.current_dir(dir); + command.env("XARGO_HOME", dir); command.env("XARGO_RUST_SRC", &rust_src); // We always need to set a target so rustc bootstrap can tell apart host from target crates. command.arg("--target").arg(target); From 169569cccb0882d3e94c82fc89ab34a34dda0604 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 2 Sep 2022 16:10:24 +0200 Subject: [PATCH 3/3] tweak variable name --- tests/pass/concurrency/sync_nopreempt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/pass/concurrency/sync_nopreempt.rs b/tests/pass/concurrency/sync_nopreempt.rs index 83ecd72ce8d..3da33fee4c0 100644 --- a/tests/pass/concurrency/sync_nopreempt.rs +++ b/tests/pass/concurrency/sync_nopreempt.rs @@ -16,7 +16,7 @@ fn check_conditional_variables_notify_all() { let (lock, cvar) = &*pair2; let guard = lock.lock().unwrap(); // Block waiting on the conditional variable. - let _x = cvar.wait(guard).unwrap(); + let _guard = cvar.wait(guard).unwrap(); }) }) .inspect(|_| {