forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmacro-caching-144965.rs
More file actions
35 lines (27 loc) · 925 Bytes
/
Copy pathmacro-caching-144965.rs
File metadata and controls
35 lines (27 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// regression test for https://github.com/rust-lang/rust/issues/144965
#![crate_name = "foo"]
#![no_std]
#[doc(hidden)]
pub struct MyStruct;
macro_rules! my_macro {
() => {
pub fn my_function() {}
/// Incorrect: [`my_function()`].
#[doc(inline)]
pub use $crate::MyStruct;
/// Correct: [`my_function`].
pub struct AnotherStruct;
};
}
pub mod one {
//@ has 'foo/one/index.html'
//@ has - '//dl[@class="item-table"]/dd[1]/a[@href="fn.my_function.html"]/code' 'my_function'
//@ has - '//dl[@class="item-table"]/dd[2]/a[@href="fn.my_function.html"]/code' 'my_function()'
my_macro!();
}
pub mod two {
//@ has 'foo/two/index.html'
//@ has - '//dl[@class="item-table"]/dd[1]/a[@href="fn.my_function.html"]/code' 'my_function'
//@ has - '//dl[@class="item-table"]/dd[2]/a[@href="fn.my_function.html"]/code' 'my_function()'
my_macro!();
}