]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/macro-doc-raw-str-hashes.rs
Rollup merge of #106950 - the8472:fix-splice-miri, r=cuviper
[rust.git] / tests / ui / macros / macro-doc-raw-str-hashes.rs
1 // run-pass
2 // The number of `#`s used to wrap the documentation comment should differ regarding the content.
3 //
4 // Related issue: #27489
5
6 macro_rules! homura {
7     ($x:expr, #[$y:meta]) => (assert_eq!($x, stringify!($y)))
8 }
9
10 fn main() {
11     homura! {
12         r#"doc = r" Madoka""#,
13         /// Madoka
14     };
15
16     homura! {
17         r##"doc = r#" One quote mark: ["]"#"##,
18         /// One quote mark: ["]
19     };
20
21     homura! {
22         r##"doc = r#" Two quote marks: [""]"#"##,
23         /// Two quote marks: [""]
24     };
25
26     homura! {
27         r#####"doc = r####" Raw string ending sequences: ["###]"####"#####,
28         /// Raw string ending sequences: ["###]
29     };
30 }