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```````
This commit is contained in:
Dylan DPC 2020-11-15 03:02:44 +01:00 committed by GitHub
commit 50603891dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,22 @@
// ignore-tidy-linelength
#![crate_type="lib"]
pub mod internal {
// @has 'raw_ident_eliminate_r_hashtag/internal/struct.mod.html'
pub struct r#mod;
/// See [name], [other name]
///
/// [name]: mod
/// [other name]: crate::internal::mod
// @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'
pub struct A;