diff options
| author | Eric Huss <eric@huss.org> | 2025-03-27 18:17:34 -0700 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2025-03-27 19:07:17 -0700 |
| commit | af2b4b94ed6f46392043f1c652f06f402d2713fc (patch) | |
| tree | dbc93388717a7ba50981e7cd59ba7fd6011c9b33 /src/doc/rustdoc | |
| parent | 7251b466a4d4dd164db1b818681af1c8cf9a3e22 (diff) | |
| download | rust-af2b4b94ed6f46392043f1c652f06f402d2713fc.tar.gz rust-af2b4b94ed6f46392043f1c652f06f402d2713fc.zip | |
Show an example of using multiple ignore attributes
Diffstat (limited to 'src/doc/rustdoc')
| -rw-r--r-- | src/doc/rustdoc/src/write-documentation/documentation-tests.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/write-documentation/documentation-tests.md b/src/doc/rustdoc/src/write-documentation/documentation-tests.md index 87e42fe1d39..077b02d603d 100644 --- a/src/doc/rustdoc/src/write-documentation/documentation-tests.md +++ b/src/doc/rustdoc/src/write-documentation/documentation-tests.md @@ -442,6 +442,15 @@ struct Foo; This doctest will not be built for targets such as `x86_64-unknown-linux-gnu`. +Multiple ignore attributes can be specified to ignore multiple targets: + +```rust +/// ```ignore-x86_64,ignore-windows +/// assert!(2 == 2); +/// ``` +struct Foo; +``` + If you want to preserve backwards compatibility for older versions of rustdoc, you can specify both `ignore` and `ignore-`, such as: |
