2 // aux-build: proc_macro_with_span.rs
4 #![warn(clippy::missing_docs_in_private_items)]
5 // When denying at the crate level, be sure to not get random warnings from the
6 // injected intrinsics by the compiler.
8 //! Some garbage docs for the crate here
9 #![doc = "More garbage"]
11 extern crate proc_macro_with_span;
13 use proc_macro_with_span::with_span;
14 use std::arch::global_asm;
16 type Typedef = String;
17 pub type PubTypedef = String;
20 pub mod pub_module_no_dox {}
26 #[allow(clippy::missing_docs_in_private_items)]
29 // It sure is nice if doc(hidden) implies allow(missing_docs), and that it
30 // applies recursively
40 BazA { a: isize, b: isize },
57 #[allow(clippy::missing_docs_in_private_items)]
59 PubBaz3A { b: isize },
67 pub const FOO1: u32 = 0;
68 #[allow(clippy::missing_docs_in_private_items)]
69 pub const FOO2: u32 = 0;
71 pub const FOO3: u32 = 0;
72 pub const FOO4: u32 = 0;
76 pub static BAR1: u32 = 0;
77 #[allow(clippy::missing_docs_in_private_items)]
78 pub static BAR2: u32 = 0;
80 pub static BAR3: u32 = 0;
81 pub static BAR4: u32 = 0;
85 pub fn documented() {}
86 pub fn undocumented1() {}
87 pub fn undocumented2() {}
92 pub fn also_documented() {}
93 pub fn also_undocumented1() {}
94 fn also_undocumented2() {}
98 pub mod public_interface {
99 pub use crate::internal_impl::documented as foo;
100 pub use crate::internal_impl::globbed::*;
101 pub use crate::internal_impl::undocumented1 as bar;
102 pub use crate::internal_impl::{documented, undocumented2};
107 // Ensure global asm doesn't require documentation.
110 // Don't lint proc macro output with an unexpected span.
111 with_span!(span pub struct FooPm { pub field: u32});
112 with_span!(span pub struct FooPm2;);
113 with_span!(span pub enum FooPm3 { A, B(u32), C { field: u32 }});
114 with_span!(span pub fn foo_pm() {});
115 with_span!(span pub static FOO_PM: u32 = 0;);
116 with_span!(span pub const FOO2_PM: u32 = 0;);