Skip to content

Commit

Permalink
Add regression test for link generation on foreign macro in jump to d…
Browse files Browse the repository at this point in the history
…efintion feature
  • Loading branch information
GuillaumeGomez committed Feb 27, 2024
1 parent 8719b74 commit 4dd05e6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/rustdoc/auxiliary/jump-to-def-macro.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#[macro_export]
macro_rules! symbols {
($name:ident = $value:expr) => {
pub const $name: isize = $value;
}
}
15 changes: 15 additions & 0 deletions tests/rustdoc/jump-to-def-macro.rs
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 4dd05e6

Please sign in to comment.