Skip to content

Commit

Permalink
Add test for macro disambiguators
Browse files Browse the repository at this point in the history
  • Loading branch information
LeSeulArtichaut committed Jun 22, 2021
1 parent dc591e1 commit f387e8c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/test/rustdoc/intra-doc/macros-disambiguators.rs
@@ -0,0 +1,25 @@
#![crate_name = "foo"]
#![deny(rustdoc::broken_intra_doc_links)]

//! [foo!()]
// @has foo/index.html '//a[@href="macro.foo.html"]' 'foo!()'

//! [foo!{}]
// @has - '//a[@href="macro.foo.html"]' 'foo!{}'

//! [foo![]](foo![])
// @has - '//a[@href="macro.foo.html"]' 'foo![]'

//! [foo1](foo!())
// @has - '//a[@href="macro.foo.html"]' 'foo1'

//! [foo2](foo!{})
// @has - '//a[@href="macro.foo.html"]' 'foo2'

//! [foo3](foo![])
// @has - '//a[@href="macro.foo.html"]' 'foo3'

#[macro_export]
macro_rules! foo {
() => {};
}

0 comments on commit f387e8c

Please sign in to comment.