Skip to content

Rustup #2530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 2, 2022
Merged

Rustup #2530

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cargo-miri/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand All @@ -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() {
Expand All @@ -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,
Expand All @@ -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() {
Expand Down Expand Up @@ -178,8 +178,8 @@ path = "lib.rs"
// 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);
Expand Down
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4fd4de7ea358ad6fc28c5780533ea8ccc09e1006
9353538c7bea6edb245457712cec720305c4576e
2 changes: 1 addition & 1 deletion tests/pass/concurrency/sync_nopreempt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 _guard = cvar.wait(guard).unwrap();
})
})
.inspect(|_| {
Expand Down