aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Fresk <emil.fresk@gmail.com>2023-01-19 13:56:59 +0100
committerHenrik Tjäder <henrik@tjaders.com>2023-03-01 00:33:30 +0100
commitb8b881f446a226d6f3c4a7db7c9174590b47dbf6 (patch)
treecf74ac7f716c0206df9c5dc4c7a2c1a5893aaddc
parent4601782466c518d313ba79d9437bf7a3f8dbbf76 (diff)
Fix so deny(missing_docs) work
-rw-r--r--examples/async-task-multiple-prios.rs3
-rw-r--r--examples/async-task.rs3
-rw-r--r--examples/big-struct-opt.rs1
-rw-r--r--examples/binds.rs1
-rw-r--r--examples/complex.rs1
-rw-r--r--examples/declared_locals.rs1
-rw-r--r--examples/destructure.rs1
-rw-r--r--examples/extern_binds.rs1
-rw-r--r--examples/extern_spawn.rs1
-rw-r--r--examples/generics.rs1
-rw-r--r--examples/hardware.rs1
-rw-r--r--examples/idle-wfi.rs1
-rw-r--r--examples/idle.rs1
-rw-r--r--examples/init.rs1
-rw-r--r--examples/locals.rs1
-rw-r--r--examples/lock.rs1
-rw-r--r--examples/multilock.rs1
-rw-r--r--examples/not-sync.rs2
-rw-r--r--examples/only-shared-access.rs1
-rw-r--r--examples/peripherals-taken.rs3
-rw-r--r--examples/preempt.rs1
-rw-r--r--examples/ramfunc.rs2
-rw-r--r--examples/resource-user-struct.rs1
-rw-r--r--examples/shared.rs1
-rw-r--r--examples/smallest.rs1
-rw-r--r--examples/spawn.rs1
-rw-r--r--examples/static.rs1
-rw-r--r--examples/t-binds.rs1
-rw-r--r--examples/t-cfg-resources.rs3
-rw-r--r--examples/t-htask-main.rs3
-rw-r--r--examples/t-idle-main.rs3
-rw-r--r--examples/t-late-not-send.rs3
-rw-r--r--examples/task.rs1
-rw-r--r--examples/zero-prio-task.rs4
-rw-r--r--macros/src/codegen/local_resources_struct.rs2
-rw-r--r--macros/src/codegen/module.rs1
-rw-r--r--macros/src/codegen/shared_resources_struct.rs4
37 files changed, 58 insertions, 2 deletions
diff --git a/examples/async-task-multiple-prios.rs b/examples/async-task-multiple-prios.rs
index f614820..5c9674d 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 e1ab143..7730c54 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 3100a0e..408a2de 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 0c1ed97..cf078ff 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 ab39792..c1e9c6c 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 79001aa..c845191 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 dc5d8ef..81eff3b 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 b24e7a1..142a11d 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 8a3928d..b2b95b9 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 dfd47ad..2f23cce 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 61eb635..62ae0d6 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 a68fe84..8134ce3 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 78f1697..0c4bd04 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 1e362be..c3081bf 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 4e3b98b..ec3d59d 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 3c1a514..203ae6f 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 2eb285e..6208cac 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 5d868df..6d1ddae 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 09cb23a..1d006e6 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 9b01466..2f710e9 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 960fc57..4b11907 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 316f6d8..e2e7f67 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 2acbbc3..fcbacae 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 fd31cfb..d0633fb 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 5071392..e54ae44 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 384f0a0..d30ecf1 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 822224e..7f656f4 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 785348b..bdeb391 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 0174f33..0328700 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 0595e9f..8f885bc 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 307ccb2..43215cf 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 0fbf237..44d1d85 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 50287ed..ab6a1e0 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 fc38509..c810e8f 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 e268508..100c3eb 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 f4c188a..4725b9a 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 24c93de..fa6f0fc 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,)*