]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/missing-doc-private-macro.rs
Auto merge of #106349 - LeSeulArtichaut:dyn-star-tracking-issue, r=jackh726
[rust.git] / src / test / ui / lint / missing-doc-private-macro.rs
1 // Checks that undocumented private macros will not generate `missing_docs`
2 // lints, but public ones will.
3 //
4 // This is a regression test for issue #57569
5 #![deny(missing_docs)]
6 #![feature(decl_macro)]
7 //! Empty documentation.
8
9 macro new_style_private_macro {
10     () => ()
11 }
12
13 pub(crate) macro new_style_crate_macro {
14     () => ()
15 }
16
17 macro_rules! old_style_private_macro {
18     () => ()
19 }
20
21 mod submodule {
22     pub macro new_style_macro_in_private_module {
23         () => ()
24     }
25
26     macro_rules! old_style_mod_private_macro {
27         () => ()
28     }
29
30     #[macro_export]
31     macro_rules! exported_to_top_level {
32         //~^ ERROR missing documentation for a macro
33         () => ()
34     }
35 }
36
37 pub macro top_level_pub_macro {
38     //~^ ERROR missing documentation for a macro
39     () => ()
40 }
41
42 /// Empty documentation.
43 pub fn main() {}