This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -667,7 +667,7 @@ This flag can be passed multiple times to nest wrappers.
667667
668668## Passing arguments to rustc when compiling doctests
669669
670- You can use the ` --doctest-compilation-args ` option if you want to add options when compiling the
670+ You can use the ` --doctest-compilation-args ` flag if you want to add options when compiling the
671671doctest. For example if you have:
672672
673673``` rust,no_run
Original file line number Diff line number Diff line change 1+ // This test checks that the test behave when `--doctest-compilation-args` is passed
2+ // multiple times.
3+
4+ //@ check-pass
5+ //@ compile-flags: --test -Zunstable-options --doctest-compilation-args=--cfg=testcase_must_be_present
6+ //@ compile-flags: --doctest-compilation-args=--cfg=another
7+ //@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
8+ //@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
9+
10+ /// ```
11+ /// #[cfg(testcase_must_be_present)]
12+ /// #[cfg(another)]
13+ /// fn must_be_present() {}
14+ ///
15+ /// fn main() { must_be_present() }
16+ /// ```
17+ pub struct Bar ;
Original file line number Diff line number Diff line change 1+
2+ running 1 test
3+ test $DIR/rustflags-multiple-args.rs - Bar (line 10) ... ok
4+
5+ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
6+
You can’t perform that action at this time.
0 commit comments