From ee39ac9840519e7b5a90d9f0f506a092f4177cd9 Mon Sep 17 00:00:00 2001
From: Ralf Jung <post@ralfj.de>
Date: Tue, 28 Jul 2020 14:00:33 +0200
Subject: [PATCH] rustup for new folder layout

---
 cargo-miri/bin.rs                   | 8 ++++----
 rust-version                        | 2 +-
 tests/run-pass/panic/catch_panic.rs | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/cargo-miri/bin.rs b/cargo-miri/bin.rs
index 33a1124aab..000a4d41cc 100644
--- a/cargo-miri/bin.rs
+++ b/cargo-miri/bin.rs
@@ -10,7 +10,7 @@ use std::process::Command;
 
 use rustc_version::VersionMeta;
 
-const XARGO_MIN_VERSION: (u32, u32, u32) = (0, 3, 21);
+const XARGO_MIN_VERSION: (u32, u32, u32) = (0, 3, 22);
 
 const CARGO_MIRI_HELP: &str = r#"Interprets bin crates and tests in Miri
 
@@ -271,10 +271,10 @@ fn setup(subcommand: MiriCommand) {
                 .stdout;
             let sysroot = std::str::from_utf8(&sysroot).unwrap();
             let sysroot = Path::new(sysroot.trim_end_matches('\n'));
-            // Check for `$SYSROOT/lib/rustlib/src/rust/src`; test if that contains `libstd/lib.rs`.
+            // Check for `$SYSROOT/lib/rustlib/src/rust/library`; test if that contains `std/Cargo.toml`.
             let rustup_src =
-                sysroot.join("lib").join("rustlib").join("src").join("rust").join("src");
-            if !rustup_src.join("libstd").join("lib.rs").exists() {
+                sysroot.join("lib").join("rustlib").join("src").join("rust").join("library");
+            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"]);
diff --git a/rust-version b/rust-version
index 3f188639fa..1ba022ac96 100644
--- a/rust-version
+++ b/rust-version
@@ -1 +1 @@
-efc02b03d18b0cbaa55b1e421d792f70a39230b2
+1454bbd4fdac9b7272b93fe82860613dccc0afad
diff --git a/tests/run-pass/panic/catch_panic.rs b/tests/run-pass/panic/catch_panic.rs
index 811c370d81..6dc47f2f59 100644
--- a/tests/run-pass/panic/catch_panic.rs
+++ b/tests/run-pass/panic/catch_panic.rs
@@ -1,4 +1,4 @@
-// normalize-stderr-test "[^ ]*libcore/[a-z_/]+.rs[0-9:]*" -> "$$LOC"
+// normalize-stderr-test "[^ ]*core/[a-z_/]+.rs[0-9:]*" -> "$$LOC"
 #![feature(never_type)]
 #![allow(unconditional_panic)]