forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#121680 - GuillaumeGomez:foreign-macro-jump-…
…to-def, r=notriddle Fix link generation for foreign macro in jump to definition feature The crate name is already added to the link so it shouldn't be added a second time for local foreign macros. r? ``@notriddle``
- Loading branch information
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |