Skip to content

Commit 5060389

Browse files
authored
Rollup merge of #78962 - poliorcetics:rustdoc-raw-ident-test, r=jyn514
Add a test for r# identifiers I'm not entirely sure I properly ran the test locally (I think so though), waiting for CI to confirm. :) ```````@rustbot``````` modify labels: T-rustdoc r? ```````@jyn514```````
2 parents 7f7fa97 + 309d863 commit 5060389

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Diff for: src/test/rustdoc/raw-ident-eliminate-r-hashtag.rs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// ignore-tidy-linelength
2+
3+
#![crate_type="lib"]
4+
5+
pub mod internal {
6+
// @has 'raw_ident_eliminate_r_hashtag/internal/struct.mod.html'
7+
pub struct r#mod;
8+
9+
/// See [name], [other name]
10+
///
11+
/// [name]: mod
12+
/// [other name]: crate::internal::mod
13+
// @has 'raw_ident_eliminate_r_hashtag/internal/struct.B.html' '//*a[@href="../../raw_ident_eliminate_r_hashtag/internal/struct.mod.html"]' 'name'
14+
// @has 'raw_ident_eliminate_r_hashtag/internal/struct.B.html' '//*a[@href="../../raw_ident_eliminate_r_hashtag/internal/struct.mod.html"]' 'other name'
15+
pub struct B;
16+
}
17+
18+
/// See [name].
19+
///
20+
/// [name]: internal::mod
21+
// @has 'raw_ident_eliminate_r_hashtag/struct.A.html' '//*a[@href="../raw_ident_eliminate_r_hashtag/internal/struct.mod.html"]' 'name'
22+
pub struct A;

0 commit comments

Comments
 (0)