From 0abea28107e861c7de6fd98df38bbb725d408d1d Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Wed, 15 Oct 2025 23:14:15 -0400 Subject: [PATCH] test(rustdoc): depinfo cannot be emitted to stdout This commit demonstrates that `rustdoc --emit=depinfo=-` hasn't yet supported emitting to stdout. --- tests/run-make/rustdoc-dep-info/rmake.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/run-make/rustdoc-dep-info/rmake.rs b/tests/run-make/rustdoc-dep-info/rmake.rs index 166e8d5702fc..2c37f1d5e237 100644 --- a/tests/run-make/rustdoc-dep-info/rmake.rs +++ b/tests/run-make/rustdoc-dep-info/rmake.rs @@ -45,4 +45,15 @@ fn main() { assert!(!path("precedence1.d").exists()); assert!(!path("precedence2.d").exists()); assert!(path("precedence3.d").exists()); + + // stdout (-) also wins if being the last. + let result = rustdoc() + .input("lib.rs") + .arg("-Zunstable-options") + .emit("dep-info=precedence1.d") + .emit("dep-info=-") + .run(); + assert!(!path("precedence1.d").exists()); + assert!(path("-").exists()); // `-` be treated as a file path + assert!(result.stdout().is_empty()); // Nothing emitted to stdout }