From fb10084b84b23e042c8888490c771ae5a315cfab Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Mon, 21 Jul 2025 20:10:58 +0530 Subject: [PATCH] add test_lld_opt_in test --- src/bootstrap/src/core/builder/tests.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index 81a526593b4d..4cc57996f3ff 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -1646,22 +1646,15 @@ mod snapshot { #[test] fn test_lld_opt_in() { - let target: &'static str = Box::leak(Box::new(host_target())); - let slice: &'static [&'static str] = Box::leak(Box::new([target])); - - with_lld_opt_in_targets(slice, || { + with_lld_opt_in_targets(vec![host_target()], || { let ctx = TestCtx::new(); - insta::assert_snapshot!( - ctx.config("doc") - .path("core") - .override_target_no_std(&host_target()) + ctx.config("build") + .path("compiler") .render_steps(), @r" [build] llvm [build] rustc 0 -> rustc 1 [build] rustc 0 -> LldWrapper 1 - [build] rustdoc 0 - [doc] std 1 crates=[core] "); }); }