diff options
37 files changed, 58 insertions, 2 deletions
diff --git a/examples/async-task-multiple-prios.rs b/examples/async-task-multiple-prios.rs index f614820c..5c9674d7 100644 --- a/examples/async-task-multiple-prios.rs +++ b/examples/async-task-multiple-prios.rs @@ -1,6 +1,9 @@ +//! examples/async-task-multiple-prios.rs + #![no_main] #![no_std] #![feature(type_alias_impl_trait)] +#![deny(missing_docs)] use panic_semihosting as _; diff --git a/examples/async-task.rs b/examples/async-task.rs index e1ab1432..7730c54d 100644 --- a/examples/async-task.rs +++ b/examples/async-task.rs @@ -1,6 +1,9 @@ +//! examples/async-task.rs + #![no_main] #![no_std] #![feature(type_alias_impl_trait)] +#![deny(missing_docs)] use panic_semihosting as _; diff --git a/examples/big-struct-opt.rs b/examples/big-struct-opt.rs index 3100a0e2..408a2dec 100644 --- a/examples/big-struct-opt.rs +++ b/examples/big-struct-opt.rs @@ -6,6 +6,7 @@ #![no_main] #![no_std] #![feature(type_alias_impl_trait)] +#![deny(missing_docs)] use panic_semihosting as _; diff --git a/examples/binds.rs b/examples/binds.rs index 0c1ed971..cf078ffe 100644 --- a/examples/binds.rs +++ b/examples/binds.rs @@ -4,6 +4,7 @@ #![deny(warnings)] #![no_main] #![no_std] +#![deny(missing_docs)] use panic_semihosting as _; diff --git a/examples/complex.rs b/examples/complex.rs index ab397924..c1e9c6c6 100644 --- a/examples/complex.rs +++ b/examples/complex.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/declared_locals.rs b/examples/declared_locals.rs index 79001aa5..c8451910 100644 --- a/examples/declared_locals.rs +++ b/examples/declared_locals.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/destructure.rs b/examples/destructure.rs index dc5d8ef8..81eff3b4 100644 --- a/examples/destructure.rs +++ b/examples/destructure.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] #![feature(type_alias_impl_trait)] diff --git a/examples/extern_binds.rs b/examples/extern_binds.rs index b24e7a19..142a11d0 100644 --- a/examples/extern_binds.rs +++ b/examples/extern_binds.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/extern_spawn.rs b/examples/extern_spawn.rs index 8a3928d5..b2b95b9d 100644 --- a/examples/extern_spawn.rs +++ b/examples/extern_spawn.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] #![feature(type_alias_impl_trait)] diff --git a/examples/generics.rs b/examples/generics.rs index dfd47adf..2f23cce9 100644 --- a/examples/generics.rs +++ b/examples/generics.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/hardware.rs b/examples/hardware.rs index 61eb6357..62ae0d66 100644 --- a/examples/hardware.rs +++ b/examples/hardware.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/idle-wfi.rs b/examples/idle-wfi.rs index a68fe845..8134ce3e 100644 --- a/examples/idle-wfi.rs +++ b/examples/idle-wfi.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/idle.rs b/examples/idle.rs index 78f16977..0c4bd044 100644 --- a/examples/idle.rs +++ b/examples/idle.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/init.rs b/examples/init.rs index 1e362be7..c3081bf8 100644 --- a/examples/init.rs +++ b/examples/init.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/locals.rs b/examples/locals.rs index 4e3b98bc..ec3d59d8 100644 --- a/examples/locals.rs +++ b/examples/locals.rs @@ -2,6 +2,7 @@ #![feature(type_alias_impl_trait)] #![deny(unsafe_code)] +#![deny(missing_docs)] #![deny(warnings)] #![no_main] #![no_std] diff --git a/examples/lock.rs b/examples/lock.rs index 3c1a5142..203ae6f4 100644 --- a/examples/lock.rs +++ b/examples/lock.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] #![feature(type_alias_impl_trait)] diff --git a/examples/multilock.rs b/examples/multilock.rs index 2eb285ea..6208cacc 100644 --- a/examples/multilock.rs +++ b/examples/multilock.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] #![feature(type_alias_impl_trait)] diff --git a/examples/not-sync.rs b/examples/not-sync.rs index 5d868dfb..6d1ddaea 100644 --- a/examples/not-sync.rs +++ b/examples/not-sync.rs @@ -2,6 +2,7 @@ // #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] #![feature(type_alias_impl_trait)] @@ -9,6 +10,7 @@ use core::marker::PhantomData; use panic_semihosting as _; +/// Not sync pub struct NotSync { _0: PhantomData<*const ()>, data: u32, diff --git a/examples/only-shared-access.rs b/examples/only-shared-access.rs index 09cb23a5..1d006e63 100644 --- a/examples/only-shared-access.rs +++ b/examples/only-shared-access.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] #![feature(type_alias_impl_trait)] diff --git a/examples/peripherals-taken.rs b/examples/peripherals-taken.rs index 9b014667..2f710e90 100644 --- a/examples/peripherals-taken.rs +++ b/examples/peripherals-taken.rs @@ -1,5 +1,8 @@ +//! examples/peripherals-taken.rs + #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/preempt.rs b/examples/preempt.rs index 960fc571..4b11907c 100644 --- a/examples/preempt.rs +++ b/examples/preempt.rs @@ -3,6 +3,7 @@ #![no_main] #![no_std] #![feature(type_alias_impl_trait)] +#![deny(missing_docs)] use panic_semihosting as _; use rtic::app; diff --git a/examples/ramfunc.rs b/examples/ramfunc.rs index 316f6d8c..e2e7f67b 100644 --- a/examples/ramfunc.rs +++ b/examples/ramfunc.rs @@ -1,9 +1,11 @@ //! examples/ramfunc.rs #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] #![feature(type_alias_impl_trait)] + use panic_semihosting as _; #[rtic::app( diff --git a/examples/resource-user-struct.rs b/examples/resource-user-struct.rs index 2acbbc36..fcbacaea 100644 --- a/examples/resource-user-struct.rs +++ b/examples/resource-user-struct.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/shared.rs b/examples/shared.rs index fd31cfb2..d0633fbd 100644 --- a/examples/shared.rs +++ b/examples/shared.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/smallest.rs b/examples/smallest.rs index 5071392d..e54ae448 100644 --- a/examples/smallest.rs +++ b/examples/smallest.rs @@ -2,6 +2,7 @@ #![no_main] #![no_std] +#![deny(missing_docs)] use panic_semihosting as _; // panic handler use rtic::app; diff --git a/examples/spawn.rs b/examples/spawn.rs index 384f0a00..d30ecf1b 100644 --- a/examples/spawn.rs +++ b/examples/spawn.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] #![feature(type_alias_impl_trait)] diff --git a/examples/static.rs b/examples/static.rs index 822224e3..7f656f45 100644 --- a/examples/static.rs +++ b/examples/static.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] #![feature(type_alias_impl_trait)] diff --git a/examples/t-binds.rs b/examples/t-binds.rs index 785348bc..bdeb3917 100644 --- a/examples/t-binds.rs +++ b/examples/t-binds.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/t-cfg-resources.rs b/examples/t-cfg-resources.rs index 0174f33e..03287009 100644 --- a/examples/t-cfg-resources.rs +++ b/examples/t-cfg-resources.rs @@ -1,7 +1,8 @@ //! [compile-pass] check that `#[cfg]` attributes applied on resources work -//! + #![no_main] #![no_std] +#![deny(missing_docs)] use panic_semihosting as _; diff --git a/examples/t-htask-main.rs b/examples/t-htask-main.rs index 0595e9fc..8f885bc1 100644 --- a/examples/t-htask-main.rs +++ b/examples/t-htask-main.rs @@ -1,5 +1,8 @@ +//! examples/h-task-main.rs + #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/t-idle-main.rs b/examples/t-idle-main.rs index 307ccb20..43215cf7 100644 --- a/examples/t-idle-main.rs +++ b/examples/t-idle-main.rs @@ -1,5 +1,8 @@ +//! examples/t-idle-main.rs + #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] diff --git a/examples/t-late-not-send.rs b/examples/t-late-not-send.rs index 0fbf237b..44d1d855 100644 --- a/examples/t-late-not-send.rs +++ b/examples/t-late-not-send.rs @@ -2,11 +2,12 @@ #![no_main] #![no_std] +#![deny(missing_docs)] use core::marker::PhantomData; - use panic_semihosting as _; +/// Not send pub struct NotSend { _0: PhantomData<*const ()>, } diff --git a/examples/task.rs b/examples/task.rs index 50287edd..ab6a1e0e 100644 --- a/examples/task.rs +++ b/examples/task.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] +#![deny(missing_docs)] #![no_main] #![no_std] #![feature(type_alias_impl_trait)] diff --git a/examples/zero-prio-task.rs b/examples/zero-prio-task.rs index fc385092..c810e8fa 100644 --- a/examples/zero-prio-task.rs +++ b/examples/zero-prio-task.rs @@ -1,10 +1,14 @@ +//! examples/zero-prio-task.rs + #![no_main] #![no_std] #![feature(type_alias_impl_trait)] +#![deny(missing_docs)] use core::marker::PhantomData; use panic_semihosting as _; +/// Does not impl send pub struct NotSend { _0: PhantomData<*const ()>, } diff --git a/macros/src/codegen/local_resources_struct.rs b/macros/src/codegen/local_resources_struct.rs index e268508b..100c3eb5 100644 --- a/macros/src/codegen/local_resources_struct.rs +++ b/macros/src/codegen/local_resources_struct.rs @@ -50,6 +50,7 @@ pub fn codegen(ctxt: Context, app: &App) -> (TokenStream2, TokenStream2) { fields.push(quote!( #(#cfgs)* + #[allow(missing_docs)] pub #name: &#lt mut #ty )); @@ -88,6 +89,7 @@ pub fn codegen(ctxt: Context, app: &App) -> (TokenStream2, TokenStream2) { let constructor = quote!( impl<'a> #ident<'a> { #[inline(always)] + #[allow(missing_docs)] pub unsafe fn new() -> Self { #ident { #(#values,)* diff --git a/macros/src/codegen/module.rs b/macros/src/codegen/module.rs index f4c188a4..4725b9a9 100644 --- a/macros/src/codegen/module.rs +++ b/macros/src/codegen/module.rs @@ -114,6 +114,7 @@ pub fn codegen(ctxt: Context, app: &App, analysis: &Analysis) -> TokenStream2 { #(#cfgs)* impl<'a> #internal_context_name<'a> { #[inline(always)] + #[allow(missing_docs)] pub unsafe fn new(#core) -> Self { #internal_context_name { __rtic_internal_p: ::core::marker::PhantomData, diff --git a/macros/src/codegen/shared_resources_struct.rs b/macros/src/codegen/shared_resources_struct.rs index 24c93de6..fa6f0fcb 100644 --- a/macros/src/codegen/shared_resources_struct.rs +++ b/macros/src/codegen/shared_resources_struct.rs @@ -47,16 +47,19 @@ pub fn codegen(ctxt: Context, app: &App) -> (TokenStream2, TokenStream2) { fields.push(quote!( #(#cfgs)* + #[allow(missing_docs)] pub #name: &#lt #mut_ #ty )); } else if access.is_shared() { fields.push(quote!( #(#cfgs)* + #[allow(missing_docs)] pub #name: &'a #ty )); } else { fields.push(quote!( #(#cfgs)* + #[allow(missing_docs)] pub #name: shared_resources::#shared_name<'a> )); @@ -103,6 +106,7 @@ pub fn codegen(ctxt: Context, app: &App) -> (TokenStream2, TokenStream2) { let constructor = quote!( impl<'a> #ident<'a> { #[inline(always)] + #[allow(missing_docs)] pub unsafe fn new() -> Self { #ident { #(#values,)* |