Skip to content

Commit 4dd05e6

Browse files
Add regression test for link generation on foreign macro in jump to defintion feature
1 parent 8719b74 commit 4dd05e6

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#[macro_export]
2+
macro_rules! symbols {
3+
($name:ident = $value:expr) => {
4+
pub const $name: isize = $value;
5+
}
6+
}

tests/rustdoc/jump-to-def-macro.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//@ aux-build:jump-to-def-macro.rs
2+
//@ build-aux-docs
3+
//@ compile-flags: -Zunstable-options --generate-link-to-definition
4+
5+
#![crate_name = "foo"]
6+
7+
// @has 'src/foo/jump-to-def-macro.rs.html'
8+
9+
#[macro_use]
10+
extern crate jump_to_def_macro;
11+
12+
// @has - '//a[@href="../../jump_to_def_macro/macro.symbols.html"]' 'symbols!'
13+
symbols! {
14+
A = 12
15+
}

0 commit comments

Comments
 (0)