From 4f373254b2f0815614d9e27cc685e763ddf83fab Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Tue, 19 Jul 2022 13:25:29 +0200 Subject: [PATCH 1/2] :up_arrow: rust-analyzer This bumps `expect-test` to 1.4.0, which is required for tests to pass from the `rust-lang/rust` repo cf. https://github.com/rust-lang/rust/pull/99444 --- src/tools/rust-analyzer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rust-analyzer b/src/tools/rust-analyzer index 5342f47f42766..7d20ff3ffbd30 160000 --- a/src/tools/rust-analyzer +++ b/src/tools/rust-analyzer @@ -1 +1 @@ -Subproject commit 5342f47f4276641ddb5f0a5e08fb307742d6cdc4 +Subproject commit 7d20ff3ffbd30a89b7baa7cd996d4d60f0da6c55 From 9c766ade424705ab88e24dd7397477a52dc466ae Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Tue, 19 Jul 2022 13:52:54 +0200 Subject: [PATCH 2/2] Set CARGO_WORKSPACE_DIR directly in `prepare_tool_cargo` cf. https://github.com/rust-lang/rust/pull/99444#issuecomment-1188945971 cf. https://github.com/rust-analyzer/expect-test/issues/33 --- src/bootstrap/tool.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index f659ccbe2507f..bbb17750f6aaa 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -250,6 +250,10 @@ pub fn prepare_tool_cargo( } } + // cargo doesn't set this env var yet, but it's needed by expect-test + // to build correct absolute paths for test_data files + cargo.env("CARGO_WORKSPACE_DIR", &dir); + // clippy tests need to know about the stage sysroot. Set them consistently while building to // avoid rebuilding when running tests. cargo.env("SYSROOT", builder.sysroot(compiler));