mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 06:15:45 +01:00
Improve RTIC doc handling
Enable use of ``` #![deny(missing_docs)] ```
This commit is contained in:
parent
1237f5b33b
commit
f6b0d18e24
8 changed files with 48 additions and 11 deletions
|
|
@ -49,7 +49,9 @@ pub fn codegen(ctxt: Context, needs_lt: &mut bool, app: &App) -> (TokenStream2,
|
|||
util::declared_static_local_resource_ident(name, &task_name)
|
||||
};
|
||||
|
||||
let local_resource_doc = format!(" Local resource `{name}`");
|
||||
fields.push(quote!(
|
||||
#[doc = #local_resource_doc]
|
||||
#(#cfgs)*
|
||||
pub #name: &#lt mut #ty
|
||||
));
|
||||
|
|
@ -82,7 +84,7 @@ pub fn codegen(ctxt: Context, needs_lt: &mut bool, app: &App) -> (TokenStream2,
|
|||
}
|
||||
}
|
||||
|
||||
let doc = format!("Local resources `{}` has access to", ctxt.ident(app));
|
||||
let doc = format!(" Local resources `{}` has access to", ctxt.ident(app));
|
||||
let ident = util::local_resources_ident(ctxt, app);
|
||||
let item = quote!(
|
||||
#[allow(non_snake_case)]
|
||||
|
|
@ -96,6 +98,7 @@ pub fn codegen(ctxt: Context, needs_lt: &mut bool, app: &App) -> (TokenStream2,
|
|||
let constructor = quote!(
|
||||
impl<#lt> #ident<#lt> {
|
||||
#[inline(always)]
|
||||
#[doc(hidden)]
|
||||
pub unsafe fn new() -> Self {
|
||||
#ident {
|
||||
#(#values,)*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue