diff options
| author | binarycat <binarycat@envs.net> | 2025-05-24 14:15:20 -0500 |
|---|---|---|
| committer | binarycat <binarycat@envs.net> | 2025-05-24 14:15:20 -0500 |
| commit | 4ef35bcaef07871f286330c13783d8cc37f9c209 (patch) | |
| tree | 8d3cafbd035b15e9d384c9abb436c4a01a9a26b5 /tests/rustdoc/doctest/ignore-sometimes.rs | |
| parent | 038d599eda4fe3e3d78103fba51ee663df86dadf (diff) | |
| download | rust-4ef35bcaef07871f286330c13783d8cc37f9c209.tar.gz rust-4ef35bcaef07871f286330c13783d8cc37f9c209.zip | |
rustdoc: use descriptive tooltip if doctest is conditionally ignored
fixes https://github.com/rust-lang/rust/issues/141092
Diffstat (limited to 'tests/rustdoc/doctest/ignore-sometimes.rs')
| -rw-r--r-- | tests/rustdoc/doctest/ignore-sometimes.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/rustdoc/doctest/ignore-sometimes.rs b/tests/rustdoc/doctest/ignore-sometimes.rs new file mode 100644 index 00000000000..0f8586d221c --- /dev/null +++ b/tests/rustdoc/doctest/ignore-sometimes.rs @@ -0,0 +1,23 @@ +#![crate_name = "foo"] + +// test for https://github.com/rust-lang/rust/issues/141092 + +//@ has 'foo/fn.f.html' '//a[@title="This example is not tested on wasm"]' 'ⓘ' +/// Example +/// +/// ```ignore-wasm +/// let x = 1; +/// ``` +pub fn f() {} + +//@ has 'foo/fn.g.html' '//a[@title="This example is not tested on wasm or windows"]' 'ⓘ' +/// ```ignore-wasm,ignore-windows +/// let x = 1; +/// ``` +pub fn g() {} + +//@ has 'foo/fn.h.html' '//a[@title="This example is not tested on wasm, windows, or unix"]' 'ⓘ' +/// ```ignore-wasm,ignore-windows,ignore-unix +/// let x = 1; +/// ``` +pub fn h() {} |
