diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-02-27 16:20:11 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-02-27 16:20:11 +0100 |
| commit | 4dd05e642403451fbe6b8db8845b2d04f0a14bbd (patch) | |
| tree | 820525e22c70bd943310feb89da4a9554a76fafb | |
| parent | 8719b740273126701a649046b39d0829776b52b0 (diff) | |
| download | rust-4dd05e642403451fbe6b8db8845b2d04f0a14bbd.tar.gz rust-4dd05e642403451fbe6b8db8845b2d04f0a14bbd.zip | |
Add regression test for link generation on foreign macro in jump to defintion feature
| -rw-r--r-- | tests/rustdoc/auxiliary/jump-to-def-macro.rs | 6 | ||||
| -rw-r--r-- | tests/rustdoc/jump-to-def-macro.rs | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/rustdoc/auxiliary/jump-to-def-macro.rs b/tests/rustdoc/auxiliary/jump-to-def-macro.rs new file mode 100644 index 00000000000..f442b9461e8 --- /dev/null +++ b/tests/rustdoc/auxiliary/jump-to-def-macro.rs @@ -0,0 +1,6 @@ +#[macro_export] +macro_rules! symbols { + ($name:ident = $value:expr) => { + pub const $name: isize = $value; + } +} diff --git a/tests/rustdoc/jump-to-def-macro.rs b/tests/rustdoc/jump-to-def-macro.rs new file mode 100644 index 00000000000..e8e97a442dd --- /dev/null +++ b/tests/rustdoc/jump-to-def-macro.rs @@ -0,0 +1,15 @@ +//@ aux-build:jump-to-def-macro.rs +//@ build-aux-docs +//@ compile-flags: -Zunstable-options --generate-link-to-definition + +#![crate_name = "foo"] + +// @has 'src/foo/jump-to-def-macro.rs.html' + +#[macro_use] +extern crate jump_to_def_macro; + +// @has - '//a[@href="../../jump_to_def_macro/macro.symbols.html"]' 'symbols!' +symbols! { + A = 12 +} |
