rust/tests/rustdoc/issue-23812.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
691 B
Rust
Raw Normal View History

2015-07-15 13:57:47 -05:00
macro_rules! doc {
(#[$outer:meta] mod $i:ident { #![$inner:meta] }) =>
(
#[$outer]
pub mod $i {
#![$inner]
}
)
}
doc! {
/// Outer comment
mod Foo {
//! Inner comment
}
}
// @has issue_23812/Foo/index.html
// @hasraw - 'Outer comment'
2022-08-11 23:44:07 -05:00
// @!hasraw - '/// Outer comment'
// @hasraw - 'Inner comment'
2022-08-11 23:44:07 -05:00
// @!hasraw - '//! Inner comment'
2015-07-15 13:57:47 -05:00
doc! {
/** Outer block comment */
mod Bar {
/*! Inner block comment */
}
}
// @has issue_23812/Bar/index.html
// @hasraw - 'Outer block comment'
2022-08-11 23:44:07 -05:00
// @!hasraw - '/** Outer block comment */'
// @hasraw - 'Inner block comment'
2022-08-11 23:44:07 -05:00
// @!hasraw - '/*! Inner block comment */'