From 65865e8f54bf271c7c9b0bb42571f2e71fee901a Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Wed, 16 Oct 2024 15:06:23 -0400 Subject: [PATCH 1/3] feat(sandbox): add `-Zsandbox` unstable flag --- src/cargo/core/features.rs | 2 ++ tests/testsuite/cargo/z_help/stdout.term.svg | 22 +++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/cargo/core/features.rs b/src/cargo/core/features.rs index 2638ff95234..c4224ebaacf 100644 --- a/src/cargo/core/features.rs +++ b/src/cargo/core/features.rs @@ -785,6 +785,7 @@ unstable_cli_options!( publish_timeout: bool = ("Enable the `publish.timeout` key in .cargo/config.toml file"), rustdoc_map: bool = ("Allow passing external documentation mappings to rustdoc"), rustdoc_scrape_examples: bool = ("Allows Rustdoc to scrape code examples from reverse-dependencies"), + sandbox: bool = ("Enable sandbox build"), script: bool = ("Enable support for single-file, `.rs` packages"), separate_nightlies: bool, skip_rustdoc_fingerprint: bool, @@ -1289,6 +1290,7 @@ impl CliUnstable { "publish-timeout" => self.publish_timeout = parse_empty(k, v)?, "rustdoc-map" => self.rustdoc_map = parse_empty(k, v)?, "rustdoc-scrape-examples" => self.rustdoc_scrape_examples = parse_empty(k, v)?, + "sandbox" => self.sandbox = parse_empty(k, v)?, "separate-nightlies" => self.separate_nightlies = parse_empty(k, v)?, "checksum-freshness" => self.checksum_freshness = parse_empty(k, v)?, "skip-rustdoc-fingerprint" => self.skip_rustdoc_fingerprint = parse_empty(k, v)?, diff --git a/tests/testsuite/cargo/z_help/stdout.term.svg b/tests/testsuite/cargo/z_help/stdout.term.svg index a429e92d58b..3f7179b887c 100644 --- a/tests/testsuite/cargo/z_help/stdout.term.svg +++ b/tests/testsuite/cargo/z_help/stdout.term.svg @@ -1,4 +1,4 @@ - +