Skip to content

Commit 4f72a14

Browse files
Add docs to generated "partial" mods
This explains their purpose and states that the exact contents are not stable.
1 parent 9d6ea47 commit 4f72a14

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

macro/src/gen/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,18 @@ fn gen_partial_mod(input: &ir::Input) -> TokenStream {
236236
});
237237

238238
let struct_visibility = inner_visibility(&input.visibility, Span::call_site());
239+
let module_doc = format!(
240+
"*Generated* by `confique`: helpers to implement `Config` for [`{}`].\n\
241+
\n\
242+
Do not use directly! Only use via the `Config` and `Partial` traits \
243+
and what's explained in the confique documentation.
244+
Any other parts of this module cannot be relied on and are not part \
245+
of the semver guarantee of `confique`.",
246+
input.name,
247+
);
248+
239249
quote! {
250+
#[doc = #module_doc]
240251
#visibility mod #mod_name {
241252
use super::*;
242253

0 commit comments

Comments
 (0)