- Notifications
You must be signed in to change notification settings - Fork 13.8k
Open
Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
I tried this code:
// test the behavior of the --no-run flag //@ check-pass //@ compile-flags:-Z unstable-options --test --no-run --edition 2024 --test-args=--test-threads=1 //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" /// ``` /// let a = true; /// ``` /// ```should_panic /// panic!() /// ``` /// ```ignore (incomplete-code) /// fn foo() { /// ``` /// ```no_run /// loop { /// println!("Hello, world"); /// } /// ``` /// fails to compile /// ```compile_fail /// let x = 5; /// x += 2; // shouldn't compile! /// ``` /// Ok the test does not run /// ``` /// panic!() /// ``` /// Ok the test does not run /// ```should_panic /// loop { /// println!("Hello, world"); /// panic!() /// } /// ``` pub fn f() {}
Meta
rustdoc --version --verbose
:
rustdoc 1.88.0 (6b00bc388 2025-06-23) binary: rustdoc commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc commit-date: 2025-06-23 host: x86_64-unknown-linux-gnu release: 1.88.0 LLVM version: 20.1.5
Metadata
Metadata
Assignees
Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Projects
Status
No status