diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-10-30 07:10:31 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-30 07:10:31 +0000 |
commit | e7c8c600b783bbf12deb952a2e10be23264de953 (patch) | |
tree | cb53e26f5333e4a22169a2a3cee91ef7e4f16882 | |
parent | 1b7e350e806540d6cc49bc9a86df8b79c5fe1e07 (diff) | |
parent | 6c4bb30e95f72bc0f8ff263064153171d28ac67e (diff) |
Merge #6411
6411: remove FIXME after rust 1.47 comes out r=lnicola a=qy3u
Remove 'FIXME' after rust 1.47 comes out. And for compatibility with versions before 1.47, did't remove 'src'.
Co-authored-by: yuqing <[email protected]>
-rw-r--r-- | crates/project_model/src/sysroot.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/project_model/src/sysroot.rs b/crates/project_model/src/sysroot.rs index b2ff98a15..f6e883ad1 100644 --- a/crates/project_model/src/sysroot.rs +++ b/crates/project_model/src/sysroot.rs | |||
@@ -60,9 +60,7 @@ impl Sysroot { | |||
60 | let mut sysroot = Sysroot { crates: Arena::default() }; | 60 | let mut sysroot = Sysroot { crates: Arena::default() }; |
61 | 61 | ||
62 | for name in SYSROOT_CRATES.trim().lines() { | 62 | for name in SYSROOT_CRATES.trim().lines() { |
63 | // FIXME: first path when 1.47 comes out | 63 | let root = [format!("{}/src/lib.rs", name), format!("lib{}/lib.rs", name)] |
64 | // https://github.com/rust-lang/rust/pull/73265 | ||
65 | let root = [format!("lib{}/lib.rs", name), format!("{}/src/lib.rs", name)] | ||
66 | .iter() | 64 | .iter() |
67 | .map(|it| sysroot_src_dir.join(it)) | 65 | .map(|it| sysroot_src_dir.join(it)) |
68 | .find(|it| it.exists()); | 66 | .find(|it| it.exists()); |
@@ -149,9 +147,6 @@ try running `rustup component add rust-src` or set `RUST_SRC_PATH`", | |||
149 | 147 | ||
150 | fn get_rust_src(sysroot_path: &AbsPath) -> Option<AbsPathBuf> { | 148 | fn get_rust_src(sysroot_path: &AbsPath) -> Option<AbsPathBuf> { |
151 | // Try the new path first since the old one still exists. | 149 | // Try the new path first since the old one still exists. |
152 | // | ||
153 | // FIXME: remove `src` when 1.47 comes out | ||
154 | // https://github.com/rust-lang/rust/pull/73265 | ||
155 | let rust_src = sysroot_path.join("lib/rustlib/src/rust"); | 150 | let rust_src = sysroot_path.join("lib/rustlib/src/rust"); |
156 | log::debug!("Checking sysroot (looking for `library` and `src` dirs): {}", rust_src.display()); | 151 | log::debug!("Checking sysroot (looking for `library` and `src` dirs): {}", rust_src.display()); |
157 | ["library", "src"].iter().map(|it| rust_src.join(it)).find(|it| it.exists()) | 152 | ["library", "src"].iter().map(|it| rust_src.join(it)).find(|it| it.exists()) |