Skip to content

Conversation

@GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Jul 19, 2021

Following rust-lang/rust#86230.

It might need to wait for rustdoc latest nightly to be published first to pass CI though (so tomorrow).

Also: the --nocapture option is unstable for now in rustdoc, is there something particular to be done until it's stable on cargo side? For now I simply add -Zunstable-options but not sure if it's the way to go?

@rust-highfive
Copy link

r? @Eh2406

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 19, 2021
@GuillaumeGomez GuillaumeGomez force-pushed the rustdoc-nocapture branch 3 times, most recently from 12e27f3 to 287987e Compare July 19, 2021 13:38
@ehuss ehuss assigned ehuss and unassigned Eh2406 Jul 26, 2021
@ehuss ehuss added S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 26, 2021
@bors
Copy link
Contributor

bors commented Feb 22, 2022

☔ The latest upstream changes (presumably #10408) made this pull request unmergeable. Please resolve the merge conflicts.

@ehuss
Copy link
Contributor

ehuss commented Mar 23, 2022

Closing as this is a bit stale. I'm also not clear what this was needed, since it looks like one can just pass -Zunstable-options themselves. Before reopening, please work with the Cargo team to settle on a design for whatever is needed here.

@ehuss ehuss closed this Mar 23, 2022
@MingweiSamuel
Copy link
Contributor

The current cargo doesn't work, I assume because --nocapture gets prefixed with --test-args. Right now cargo test -- --nocapture still hides input from doctests because it doesn't forward the --nocapture argument properly. This fixes that. See the referenced issues.

@veryjos
Copy link

veryjos commented Aug 1, 2022

Is this fixed?

@ptrself
Copy link

ptrself commented Aug 24, 2022

Doesn't seem like.. but in the interim, try this:

RUSTDOCFLAGS="-Z unstable-options --nocapture" cargo +nightly test --doc

@metasim
Copy link

metasim commented Sep 1, 2022

@ehuss @GuillaumeGomez Can you please consider reopening this? It seems the hard work has already been done in rustdoc, and but given most people use rustdoc via cargo, it's availability is quite hindered. Or am I misinterpreting the state of --nocapture in rustdoc?

@GuillaumeGomez
Copy link
Member Author

I can't reopen it so I'll let it up to cargo team.

@jsermeno jsermeno mentioned this pull request Dec 2, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 29, 2025
…ddle

rustdoc: Rename unstable option `--nocapture` to `--no-capture` in accordance with `libtest`

Context: rust-lang#133073, rust-lang#139224 (TL;DR: `libtest` has soft-deprecated `--nocapture` in favor a new & stable `--no-capture`; we should follow suit).

Since the rustdoc flag is unstable (tracking issue: rust-lang#148116), we're allowed to remove the old flag immediately. However since the flag has existed for 4 years we could hard-deprecate the flag first or at least be considerate and provide a diagnostic referring users to the new flag. This PR does neither. Let me know what you would think would be best.

Cargo doesn't use this flag, not yet at least (rust-lang/cargo#9705), so we really are free to sunset this flag without bigger consequences.
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 30, 2025
…ddle

rustdoc: Rename unstable option `--nocapture` to `--no-capture` in accordance with `libtest`

Context: rust-lang#133073, rust-lang#139224 (TL;DR: `libtest` has soft-deprecated `--nocapture` in favor a new & stable `--no-capture`; we should follow suit).

Since the rustdoc flag is unstable (tracking issue: rust-lang#148116), we're allowed to remove the old flag immediately. However since the flag has existed for 4 years we could hard-deprecate the flag first or at least be considerate and provide a diagnostic referring users to the new flag. This PR does neither. Let me know what you would think would be best.

Cargo doesn't use this flag, not yet at least (rust-lang/cargo#9705), so we really are free to sunset this flag without bigger consequences.
jhpratt added a commit to jhpratt/rust that referenced this pull request Oct 30, 2025
…ddle

rustdoc: Rename unstable option `--nocapture` to `--no-capture` in accordance with `libtest`

Context: rust-lang#133073, rust-lang#139224 (TL;DR: `libtest` has soft-deprecated `--nocapture` in favor a new & stable `--no-capture`; we should follow suit).

Since the rustdoc flag is unstable (tracking issue: rust-lang#148116), we're allowed to remove the old flag immediately. However since the flag has existed for 4 years we could hard-deprecate the flag first or at least be considerate and provide a diagnostic referring users to the new flag. This PR does neither. Let me know what you would think would be best.

Cargo doesn't use this flag, not yet at least (rust-lang/cargo#9705), so we really are free to sunset this flag without bigger consequences.
rust-timer added a commit to rust-lang/rust that referenced this pull request Oct 30, 2025
Rollup merge of #148115 - fmease:rustdoc-no-capture, r=notriddle

rustdoc: Rename unstable option `--nocapture` to `--no-capture` in accordance with `libtest`

Context: #133073, #139224 (TL;DR: `libtest` has soft-deprecated `--nocapture` in favor a new & stable `--no-capture`; we should follow suit).

Since the rustdoc flag is unstable (tracking issue: #148116), we're allowed to remove the old flag immediately. However since the flag has existed for 4 years we could hard-deprecate the flag first or at least be considerate and provide a diagnostic referring users to the new flag. This PR does neither. Let me know what you would think would be best.

Cargo doesn't use this flag, not yet at least (rust-lang/cargo#9705), so we really are free to sunset this flag without bigger consequences.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants