Fix so deny(missing_docs) work

This commit is contained in:
Emil Fresk 2023-01-19 13:56:59 +01:00 committed by Henrik Tjäder
parent 8e316deae8
commit 6bbcfbec4d
37 changed files with 58 additions and 2 deletions

View file

@ -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 _;

View file

@ -1,6 +1,9 @@
//! examples/async-task.rs
#![no_main]
#![no_std]
#![feature(type_alias_impl_trait)]
#![deny(missing_docs)]
use panic_semihosting as _;

View file

@ -6,6 +6,7 @@
#![no_main]
#![no_std]
#![feature(type_alias_impl_trait)]
#![deny(missing_docs)]
use panic_semihosting as _;

View file

@ -4,6 +4,7 @@
#![deny(warnings)]
#![no_main]
#![no_std]
#![deny(missing_docs)]
use panic_semihosting as _;

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]
#![feature(type_alias_impl_trait)]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]
#![feature(type_alias_impl_trait)]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -2,6 +2,7 @@
#![feature(type_alias_impl_trait)]
#![deny(unsafe_code)]
#![deny(missing_docs)]
#![deny(warnings)]
#![no_main]
#![no_std]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]
#![feature(type_alias_impl_trait)]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]
#![feature(type_alias_impl_trait)]

View file

@ -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,

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]
#![feature(type_alias_impl_trait)]

View file

@ -1,5 +1,8 @@
//! examples/peripherals-taken.rs
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -3,6 +3,7 @@
#![no_main]
#![no_std]
#![feature(type_alias_impl_trait)]
#![deny(missing_docs)]
use panic_semihosting as _;
use rtic::app;

View file

@ -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(

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -2,6 +2,7 @@
#![no_main]
#![no_std]
#![deny(missing_docs)]
use panic_semihosting as _; // panic handler
use rtic::app;

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]
#![feature(type_alias_impl_trait)]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]
#![feature(type_alias_impl_trait)]

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -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 _;

View file

@ -1,5 +1,8 @@
//! examples/h-task-main.rs
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -1,5 +1,8 @@
//! examples/t-idle-main.rs
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]

View file

@ -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 ()>,
}

View file

@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![deny(missing_docs)]
#![no_main]
#![no_std]
#![feature(type_alias_impl_trait)]

View file

@ -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 ()>,
}

View file

@ -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,)*

View file

@ -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,

View file

@ -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,)*