1 // check-pass
2 // Tests that we properly handle a nested macro expansion
3 // involving a `#[doc]` attribute
4 #![deny(missing_docs)]
5 //! Crate docs
6 
7 macro_rules! doc_comment {
8     ($x:expr, $($tt:tt)*) => {
9         #[doc = $x]
10         $($tt)*
11     }
12 }
13 
14 macro_rules! make_comment {
15     () => {
16         doc_comment!("Function docs",
17             pub fn bar() {}
18         );
19     }
20 }
21 
22 
23 make_comment!();
24 
main()25 fn main() {}
26