Skip to content

Commit

Permalink
Rollup merge of rust-lang#78962 - poliorcetics:rustdoc-raw-ident-test…
Browse files Browse the repository at this point in the history
…, 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`
  • Loading branch information
Dylan-DPC authored Nov 13, 2020
2 parents 13de6cf + 309d863 commit 578cc17
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/test/rustdoc/raw-ident-eliminate-r-hashtag.rs
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 578cc17

Please sign in to comment.