about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorAlexis Bourget <alexis.bourget@gmail.com>2020-11-12 01:05:27 +0100
committerAlexis Bourget <alexis.bourget@gmail.com>2020-11-12 01:05:27 +0100
commitf5e67b5ee1d442ddfc580224c69f260a07b8840b (patch)
tree736a354e3575d0ea59b0601a838701c3ddc449f7 /src/test/rustdoc
parent5404efc28a0cddee103ef6396c48ea71ff9631c8 (diff)
downloadrust-f5e67b5ee1d442ddfc580224c69f260a07b8840b.tar.gz
rust-f5e67b5ee1d442ddfc580224c69f260a07b8840b.zip
Add a test for r# identifiers
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/raw-ident-eliminate-r-hashtag.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/rustdoc/raw-ident-eliminate-r-hashtag.rs b/src/test/rustdoc/raw-ident-eliminate-r-hashtag.rs
new file mode 100644
index 00000000000..2221b5d47ac
--- /dev/null
+++ b/src/test/rustdoc/raw-ident-eliminate-r-hashtag.rs
@@ -0,0 +1,17 @@
+pub mod internal {
+    pub struct r#mod;
+
+    /// See [name], [other name]
+    ///
+    /// [name]: mod
+    /// [other name]: ../internal/struct.mod.html
+    // @has 'raw_ident_eliminate_r_hashtag/internal/struct.B.html' '//a[@href="../raw_ident_eliminate_r_hashtag/internal/struct.mod.html"]' 'name'
+    // @has 'raw_ident_eliminate_r_hashtag/internal/struct.B.html' '//a[@href="../raw_ident_eliminate_r_hashtag/internal/struct.mod.html"]' 'other name'
+    pub struct B;
+}
+
+/// See [name].
+///
+/// [name]: internal::mod
+// @has 'raw_ident_eliminate_r_hashtag/struct.A.html' '//a[@href="../raw_ident_eliminate_r_hashtag/internal/struct.mod.html"]' 'name'
+struct A;